Online Test for C
- Which is an invalid name of identifier?
worldaddition23test-namefactorial
- Find Error/Output in follwing code:
int main() {
char c = 'f';
switch (c) {
default: printf("unknown colour ");
case 'r': case 'R': printf("Red ");
case 'g': case 'G': printf("Green "); break;
case 'b': case 'B': printf("Blue");
}
}
Red Green Blue
Error
Green unknown colour Red
unknown colour Red Green
- Who is father of C Language?
Bjarne StroustrupDennis RitchieJames A. GoslingDr. E.F. Codd
- Which of these assignments is invalid?
short s = 48;float f = 4.3;double d = 4.3;int I = `1`;
- Switch statement can have any number of case instances
TrueFalse
- The statement printf("%c", 100); will print?
prints 100print garbageprints ASCII equivalent of 100None of the above
- = is used for comparison, whereas, == is used for assignment of two quantities.
TrueFalse
- For 16-bit compiler allowable range for integer constants is ______ ?
-3.4e38 to 3.4e38-32767 to 32768-32768 to 32767-32668 to 32667
- A full binary tree with n leaves contains
n nodes2n - 1 nodeslog2 n nodes2n nodes
- Which is the right way to declare constant in C?
int constant var =10;int const var = 10;const int var = 10;B & C Both
Also Exercise
Post Your Question
Social Sharing
Facebook
Search
Articles
Recently Added Jobs
Rajasthan High Court - Jodhpur Recruitment 2017 for Civil Judges
Last Date: 21 December, 2017
Last Date: 21 December, 2017
WBSEDCL Recruitment - 2017 for Office Executive
Last Date: 16 May, 2017
Last Date: 16 May, 2017
RECRUITMENT OF PROBATIONARY OFFICERS IN STATE BANK OF INDIA
Last Date: 06 March, 2017
Last Date: 06 March, 2017
UPSC Combined Medical Services Examination 2015
Last Date: 10 April, 2015
Last Date: 10 April, 2015
UPSC Engineering Services Examination 2015
Last Date: 10 April, 2015
Last Date: 10 April, 2015