Questions tagged as 'c'

1
answer

characters and ASCII table

I'm trying to perform a URI exercise, and in 1 part it asks for the following:    In the first pass, only characters that are lowercase and   capital letters should be moved 3 positions to the right, according to   ASCII table: letter 'a' sho...
asked by 11.03.2018 / 22:17
1
answer

Something equivalent to sstream library from C ++ to C

I need something similar to the stringstream that has in C language for C language, I need a lot of it because I want to perform querys on a database using C (C mysql connector). As I had no idea something like what I had in the sstream libra...
asked by 01.03.2018 / 02:39
2
answers

Checking the number repeated in the matrix in C

I can not seem to find the error of this code. I made it to check if in a 4x4 array the number being inserted already exists. For some reason that I do not know he accepts repeated values sometimes and sometimes not ... int main() { bool bExit...
asked by 26.02.2018 / 00:34
2
answers

Vector within array?

My function needs to find the line on which the first occurrence of a vector within a matrix occurs and return its line. But is always returning the wrong line, my logic is wrong? My role: int busca( int mat[][MAX],int n, int m, int N, floa...
asked by 23.06.2018 / 17:41
1
answer

Duplicate Matrix read per file in C

I have to read a 48X2 array for a .txt file, the file has this structure: nome_da_pessoa 1 2 3 4 ... N N When N is the 47th position element, I need to save the name of the person in a variable, and save the array in another variable...
asked by 23.06.2018 / 22:46
1
answer

Pass values by reference C

I have to make a program with a menu of options that allows me to read a student's information, write the name and the phone after entering their student number and determine how many students are older than an age entered by the user. The progr...
asked by 15.02.2018 / 17:39
1
answer

How do I save a dynamically allocated vector and return as a pointer in the function?

#include<stdio.h> #include<stdlib.h> void soma(float *vimp,float *vr ,int qnt, float *med, int a); void maiorvalor(float *vimp, float mval, int qnt ); main(){ float med, vimp, mval,vr; int qnt,i,a; printf("informe a q...
asked by 13.03.2018 / 19:33
2
answers

Working with binary data

I have a function in C that receives two bytes one with the highest significant value (msb) and one with a smaller value (lsb) and then converts them to decimal. int get_pea(char *buffer) { char lsb[8], msb[8], pea[16]; unsigned int i;...
asked by 04.04.2018 / 02:07
1
answer

Doubts with Scientific Notation

There is another way than with% E in c, why did I do this and uri gave 10% error. Issue Link My code. #include <stdio.h> int main(int argc, char** argv) { double teste; scanf("%lf", &teste); if(teste == -0) { printf...
asked by 07.02.2018 / 15:26
1
answer

Caesar figure, Error in moving letters

I'm trying to make a program that the user will enter a name and will be asked how many positions the user wants to shift to the right. But I had a problem. If I type the letter A and move to 10 positions, the number 7 will appear, how can I sol...
asked by 31.01.2018 / 23:27