Online Test for C
- Spaces and commas are allowed in a variable name.
TrueFalse
- Find Error/Output in follwing code:
int main()
{
char arr[7]="Network";
printf("%s", arr);
return 0;
}
Network
N
Garbage value
Compilation error
- Find Error/Output in follwing code:
int main()
{
int a = 10, b = 25;
a = b++ + a++;
b = ++b + ++a;
printf("%d %d n", a, b);
}
36 64
35 62
36 63
30 28
- For 16-bit compiler allowable range for integer constants is ______ ?
-3.4e38 to 3.4e38-32767 to 32768-32768 to 32767-32668 to 32667
- Which of the following is valid commenting style in C?
/* comment */// comment/* Comment line 1 <br> Comment line 2 */All of the above
- Find Error/Output in follwing code:
void main()
{
int a = 1, b=2, c=3;
if(a,b,c)
{
printf("EXAM");
}
}
EXAM
No Output
Run time error
None of the above
- Find Error/Output in follwing code:
int main()
{
printf("%d%d%d", sizeof(3.14f), sizeof(3.14l));
}
4160
844
3284
None of the above
- An array elements are always stored in _________ memory locations.
SequentialRandomSequential and RandomNone of the above
- How many times is a do while loop guaranteed to loop?
0Variable1Infinitely
Also Exercise
Post Your Question
Social Sharing
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