void main() { struct { int EmpNo; } var; var.EmpNo=193149; printf("EmpNo: %d",var.EmpNo); }
Compilation Error - Struct cannot be defined without a name
193149
Compilation Error - Struct cannot be defined inside a Function
Some Random Number
void main() { char ch='ABCD'; switch(ch) { case 'ABCD': printf("HelloABCD"); break; case 'A': printf("HelloA"); break; case 'B': printf("HelloB"); break; case 'C': printf("HelloC"); break; case 'D': printf("HelloD"); break; } }
HelloA
HelloB
HelloABCD
HelloD
HelloC
Compilation Error
void main() { int Add() { return 50; } printf("%d",Add()); }
Compilation Error - Cannot define Function inside Function
50
Cant say
void main() { printf("Hello"); return 5; printf(" World"); }
I have started hating C now!!
Hello
Compilation Error - Cannot return when return type is Void
Hello World
Segmentation fault
void main() { int *ptr; int item=5; int arr[]={10,20,30,40,50}; ptr = &item; for(;item>=0;item--) { printf("%d ",*ptr); ptr--; } }
5 50 40 30 20 10
5 Followed by Random Numbers
5 4 3 2 1
Segmentation Fault
Using Proc SQL, we can create a macro variable.
True
False
void main() { int i=5; i+=i*=i-=i/i; printf("%d",i); }
5
25
20
32
How many types of Merge are there.
1
2
3
4
Todays() returns__________?
January 1, 1960
today’s date(number of days since January 1, 1960).
1960
January 1960
Who is the Father of C, C++ and this Quiz?
Dennis Ritchie, Bjarne Stroustrup, Ultimatix Team
Dennis Ritchie, Me
Dennis Ritchie, Bjarne Stroustrup, Prateek Shrivastava
Dennis Ritchie, Bjarne Stroustrup, Pratik Srivastav