Questions tagged as 'c'

1
answer

Variable-sized object may not be initialized

Problems in C. This error is appearing:    Variable-sized object may not be initialized What can I do to fix this error? Being that I have already initialized everything. LINE 66, 67 and 68 #include <stdio.h> #include <stdli...
asked by 06.11.2016 / 17:13
2
answers

Converts String to Arduino int in C

Good people, I'll try to explain my problem. I am developing a small software in NetBeans that communicates with Arduino via Serial Port. My problem is that in NetBeans I'm sending String, and I need to convert this String to integer and I'm...
asked by 03.11.2016 / 04:23
1
answer

Conditional bugging in C

When you run the program and type the option it does not scan the value given by the user. I do not know what may be bugging the variable choice this time. What could it be? #include <stdio.h> #include <stdlib.h> float medias[4][5...
asked by 28.06.2016 / 22:35
1
answer

Pointer error with dynamic library call

I want a method inside a dynamic library to read the value from inside a pointer using dlfcn.h . But it always has a memory error when I try to access the value inside the pointer. main.c #include <dlfcn.h> int main(int ar...
asked by 25.11.2016 / 02:41
1
answer

Help with string

Make a program that finds the set of 5 consecutive digits in the sequence of only numeric characters that manages the largest product, print this 5-digit set and the result of your product. Example: 7316717653133062499998225119674426574742355...
asked by 17.10.2016 / 16:27
1
answer

Syntax error C [closed]

I read the chapter of matrices in Herbert Schildt's book, C complete and total, and I decided to transcribe the algorithm elaborated to simulate an old game. After all, Dev-c ++ encountered a syntactic error. Would anyone know to answer me why?...
asked by 14.10.2016 / 03:18
1
answer

Doubt in a C program !!! List simply chained!

I was trying to make a linked list, but I can not get it to insert or print it. If anyone can bring a light to my program, I appreciate it. #include <stdio.h> #include <stdlib.h> typedef struct cel celula; struct c...
asked by 14.10.2016 / 00:01
1
answer

getpid and getuid nonzero for root

I have the following problem. When running: void main(void){ uid_t getuid(void); gid_t getgid(void); uid_t user_id; gid_t group_id; printf("user_id: %d\n",user_id); printf("group_id: %d\n",group_id); exit(0); } I have a return: user_id:...
asked by 24.04.2016 / 20:15
2
answers

Several errors in C code - How to fix?

#include <stdio.h> #include <math.h> void rebeber_matriz (int l,int c) { int M[l][c]; for (l=0;l<4;l++) { for (c=0;c<4;c++) { printf ("Insira o valor do numero da linha: ",l," e da coluna...
asked by 10.10.2015 / 02:39
3
answers

map in C works?

I wonder if it is possible to use map in C. I know it works in C ++, but in C it always gives compilation error. If someone has already used map in C, could you show me how to use it? #include <map> #include <stdio.h> int m...
asked by 04.05.2015 / 14:27