Questions tagged as 'c'

1
answer

Working with Struct and problem in print, changing Struct and deleting a Struct [closed]

I have a job of the faculty to do that is to create a struct of "Library Register" (cataloging code, name of the work, name of the author, publisher, donated works of each area, number of pages) with options of "Register book, search for catalog...
asked by 19.06.2014 / 19:20
2
answers

Print special characters on windows console

How to print special characters like 'is' and 'ç' in windows console (printf)?     
asked by 08.06.2014 / 21:34
3
answers

Convert "Floating" Fractional Binary to Decimal

So people here know how I can convert 1.01010101 for base 10 in case it is in base 2 "binary" the answer is this in base10 1.3320312510 . I need the logic to handle this case .. att #include<stdio.h> #include<stdlib.h> int c[1...
asked by 24.03.2016 / 19:57
2
answers

How do I create a Makefile in C

I'm having trouble running the makefile. main: ex09.o funcao1.o gcc -c ex09.o funcao1.o -o main ex09.o: ex09.c gcc -c ex09.c funcao1.o: funcao1.c funcao1.h gcc -c funcao1.c clean: rm *.o One of the linker er...
asked by 01.10.2016 / 20:41
2
answers

End of entry Java Scanner

This code in C will read integers until you type Control-Z (end of entry in windows). void main(int argc, char *argv[]) { char line[100]; int sum = 0; while(scanf("%s", line) == 1) { sum += atoi(line); } printf("%...
asked by 03.04.2014 / 16:52
2
answers

How to create a vector2 in C?

I would like to know if you have how to create a class, to store 2 variables, for example, a Vector2, where I would instantiate and use like this: Vector2 tile; int posX, posY; posX = tile.x; posY = tile.Y; or something like that.     
asked by 29.03.2014 / 07:17
1
answer

Hash Tables

I have a closed hash table with open addressing and linear probing for the following dictionary of words in a text; The input operation works like this: 1) The program asks for the first line of the text (with a limit of 100 characters)...
asked by 27.10.2014 / 16:59
1
answer

Concatenate string with int in printf

You can do this in C: int MAX = 30; printf("\n| %".MAX."s | %8s | %8s |", "Nome", "Salario", "Idade"); printf("\n| %".MAX."s | %8.2f | %8d |", pessoa[i].nome, pessoa[i].salario, pessoa[i].idade); Note the MAX between strings to de...
asked by 06.11.2014 / 00:32
3
answers

Doubt about pointers in C

So folks, I have a question here. What does each of these statements mean? *ponteiro = Valor do ponteiro ponteiro = (?) &ponteiro = Endereço de memória do ponteiro I would like someone to explain the use of the medium, only the "p...
asked by 15.03.2018 / 01:48
1
answer

Pointer is lost at function output

I have the following function typedef struct userDataStruct { char name [MAX_NAME_LENGTH+1]; struct userDataStruct *next; } userDataType; errorType GetUsers (userDataType **list) { FILE *file; char buffer [LINE_LENGTH+1];...
asked by 12.12.2017 / 23:05