Questions tagged as 'c'

3
answers

What purpose of unsigned in C ++

What is the purpose of unsigned in C ++? Example: unsigned char ch2;     
asked by 30.07.2015 / 16:05
3
answers

What are unions? Why use them inside structs?

I would like to understand the differences between union and struct . I noticed that both can be accessed in the same way: u.membro uPrt->membro s.membro sPrt->membro In practice I've seen several codes using unions...
asked by 13.01.2015 / 12:53
4
answers

Switch / case very interesting in Swift - What other languages support this?

The Swift language has a very interesting and intuitive way to work with switch-case breaks, with partial-matching, pattern-matching, etc. techniques, see these examples: let age = 33 switch(age){ case let x where x >= 0 && x <=...
asked by 30.06.2016 / 02:44
2
answers

What is the purpose of the void function parameter in C language?

Is the void parameter only semantic or does it do anything I do not know? int main() { return 0; } int main(void) { return 0; }     
asked by 04.07.2016 / 03:24
3
answers

How does the Xor Swap algorithm work?

I was studying bitwise operations and came across the Xor Swap algorithm. I understand what it does (it exchanges the value of two variables), but I do not understand how it does it, at the computation and coding level. Follow the algorithm i...
asked by 17.03.2014 / 01:27
3
answers

Variable in main is global?

I have read that global variables are those that we declare out of all functions using #define and that way they could be used by all the functions of a program. However, I was informed that the variables declared in main are globa...
asked by 28.08.2015 / 03:18
5
answers

How to declare a date variable in C?

I need to create an abstract type of data that represents a person, including name, date of birth and CPF, and create a variable that is a pointer to this TAD (in the main program). To a certain extent I know, but I do not know which is the r...
asked by 04.05.2016 / 18:48
1
answer

What is the meaning of the word "cout" in C / C ++?

Well, it is very common in programming languages to have keywords responsible for printing output. Some are classic like echo , print , printf and write , etc. But in% w / o% we have% w / o%. For me, this word does...
asked by 15.02.2016 / 13:35
2
answers

Is there any way to run a java (.jar) program from a C or C ++ program?

I want to know if there is a way I can write a program .jar , and write a C / C ++ program that calls the JVM to execute the .jar file. It's possible? If so, can you give me an example code or an instruction how to do this?     
asked by 25.07.2016 / 03:26
3
answers

Creating your own header file

Would anyone know to explain the utility and how to create the header file in c with an example?     
asked by 01.02.2014 / 03:46