Questions tagged as 'c'

1
answer

How do I retrieve the current date of a MySQL database on Arduino?

I am connecting to database mysql using arduino next to esp8266, wanted to know how to get current date store in a variable and then send it to the bank. I'm having trouble just getting the current date.     
asked by 20.06.2018 / 02:58
2
answers

Error when user provides file name

#include <stdio.h> int main(void) { char ch; int caracteres = 0; int linhas = 0; int imprimiveis = 0; FILE *arquivo; char nome[50]; printf("Escreva o nome do arquivo: "); fgets(nome, 50, arquivo); ar...
asked by 03.07.2018 / 23:07
2
answers

How to pass structure data to a text file?

I have this structure: struct televisao { int id_guit; int precodia; int preco; int estado; char nome[20]; }; I wanted to ask the user to insert data from this structure and save it to a .txt file, how do I get it? The p...
asked by 30.05.2018 / 20:18
2
answers

Problem in compiling string in C

I'm trying to compile this code in C: #include<stdio.h> #include<string.h> #define tam 100 typedef struct TipoAluno{ char nome[50]="A"; char curso[50]="B"; char cota[50]="C"; int matricula; int coef; }TipoAluno...
asked by 02.06.2018 / 18:06
2
answers

delete people name from an array in C

Hello. I have an algorithm in C to delete a user, but not to interact in the array: #include<stdio.h> #include<stdlib.h> #include<locale.h> #include<conio.h> #define numeroUSER 100 char nome[numeroUSER][100]...
asked by 01.06.2018 / 02:33
1
answer

Doubt with% i [duplicate]

I know that with% i you can read numbers in decimal, hexadecimal, and octal, but when I type 0x15, the number 21 appears, being fifteen that was to appear or am I wrong? Example below #include <stdio.h> int main(int argc, char** ar...
asked by 01.05.2018 / 20:18
1
answer

insert names neatly into a list, I'm not aware of this

// insert function ai; then only do this with the first 3 names, the others she does not order Aluno *cad(Aluno *aluno) { Aluno *aux; while(1) { aux = aluno; if(aux->prox == NULL) { Aluno *criar = novo(); i...
asked by 23.05.2018 / 21:39
1
answer

Error in my data structure [PILE]

My code is displaying two errors. As I'm learning, I've tried several ways to fix it. Can someone please help me? I need to insert a number and a string in my stack. But you're making a mistake in my structure. #include <stdio.h> #inc...
asked by 22.03.2018 / 17:00
3
answers

How to concatenate strings without using function?

Good afternoon people, I have this doubt. How do I concatenate two strings without using function or library for this?     
asked by 16.03.2018 / 21:02
1
answer

How to read data from an excel table in C?

I know how to read data and write to .txt files with C code through fscanf(), fprintf() functions and so on. But now I would like to know if there are C functions or libraries that allow me to treat data from a excel table,...
asked by 28.03.2018 / 14:37