C Programming Language Quiz
English
Advanced
This quiz has basic question about C programming language.
Description
31
Questions
1 min
Per question
4:25
Average time
3.0
Contest Score
4.5
Community Rating
17
Participants
Good for basic level of c language.
Your answer is "It compiles the program based on a condition".
About "It is handled by the computer": it is correct too, because preprocessor is running on the computer.
You say that 0, and this is your code:
b = a + b;
a= b - a;
b= b - a;
But this is possible only for number data types. How to swap two instances of a struct, for example?
Your answer is string constant.
Let's read https://en.wikipedia.org/wiki/Literal_(computer_programming):
"Literal is a notation for representing a fixed value in source code."
For example, literals are: 1, 1.5, "hello", true, 'x'.
String constant is const char s="world".
CORRECTION: the question should read as String literals.
Your answer is C's shortcoming.
But this is advantage too, because language spends time for automatic array bound checking, so C works faster because of it doesn't do this.
https://en.m.wikipedia.org/wiki/Bounds_checking
Thanks for pointing out the ambiguity.
Let's read https://en.cppreference.com/w/c/keyword:
"This is a list of reserved keywords in C. Since they are used by the language, these keywords are not available for re-definition." And here provided list of keywords.
You can define your own variable named "main", "scanf", "IF" or "printf", so they all are not keywords. The only keyword in options is "if".
I can name arguments of main function as I want. Example: https://ideone.com/zTUAaK
https://opensource.com/article/19/5/how-write-good-c-main-function#:~:text=The%20main()%20function%20has,(negative%20one)%20on%20failure.&text=The%20argument%20vector%2C%20argv%2C%20is,line%20that%20invoked%20your%20program.