Questions tagged as 'c'

0
answers

How to open CD-ROM in C? [closed]

I want to create a C algorithm to open and close the CD-ROM drive, I took a look at some tutorials but they did not work. I would like to know which libraries to use.     
asked by 11.10.2017 / 13:03
2
answers

Search in Width - error: 'str_no' undeclared (first use in this function)

I have the following code in C , for a search in width: #include <stdio.h> #include <stdlib.h> #include <conio.h> //Variáveis globais int id = 0; int proximo = 0; //Função de Busca em Largura int buscaLargura(int *gra...
asked by 21.06.2016 / 01:08
1
answer

Loading multiple libraries with loadlibrary

I have two libraries, sph.dll and mydll.dll , and I try to load them using LoadLibrary as shown below: HMODULE hlib = LoadLibrary("mydll.dll"); if(!hlib){ printf("error"); MessageBox(NULL, "Erro -> mydll.dll não encontrado...
asked by 07.08.2015 / 03:46
2
answers

What is the error in this Code: [closed]

I am trying to compile this code, use the C head but this is returning me errors #include <stdio.h> void go_south_east(int* lat, int* lon) { *lat = *lat -1; *lon = *lon - 1; } int main() { i...
asked by 07.11.2014 / 12:27
3
answers

Comparison of char in C

I need to find out if each element in a linked list is a vowel or not. How can I fix my code? int BuscaNv(LISTA* resp){ NO* atual = resp->inicio; while(atual){ if(atual->letra == 'a' || 'e' || 'i' || 'o' || 'u'){ pri...
asked by 04.09.2017 / 14:01
3
answers

Fibonacci sequence does not work [closed]

I have a problem with the output of the Fibonacci sequence and I can not identify where the error is. Here's the code: #include <stdio.h> #include <stdlib.h> int main(){ int i, Fib[100], n; scanf("%d",&n); printf("0 "); fo...
asked by 07.10.2017 / 17:14
4
answers

Sum of cousins in a range in C

My problem is to add cousins to a user-defined range, including ranges if they are prime. Example: ENTRY: 2 and 10 EXIT: 17 I was able to do this: #include <stdio.h> int main() { int numI, numF, primos = 0; scanf("...
asked by 30.06.2018 / 01:25
5
answers

Logical error when using If / else

I'm trying to get my program to identify a triangle and tell me if it's Equilateral, isosceles or scalene. I am a beginner in the C language, so I created a structure with If / Else to analyze the conditions to identify if the value entered corr...
asked by 04.10.2018 / 23:48
2
answers

Pointers and arrays picking up something not expected

#include <stdio.h> int main() { int vetor[][3] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; int valor= *(vetor[1] + 1) + **(vetor + 3); printf("%d", valor); } The code above was taken from theoretical exercises, but I do not h...
asked by 25.09.2018 / 19:32
0
answers

Problem with buffer and / or I2C in C

I hope to get some help here. I'm programming to Beaglebone Black using I2C sensors through the Eclipse IDE for C / C ++ Developers, Version: Luna Service Release 2 (4.4.2). My problem is with code development for I2C, especially between the...
asked by 17.04.2015 / 16:47