Wipro interview questions for laterals | Set 1
25 question
1hr time
All Are MCQ:
1 mark each, no negative marks
Domain: C language
1)
int main(){ int i; i = 0; if (x=0) { printf("x is zero"); } else { printf("x is not zero"); }} |
2)
int main(){ int i = -3; printf("%d n", (++i + ++i));} |
3)
int main(){ int x = 0xF01DEAD; printf("%X n",(x>>1)<<1);} |
4)
int main(){ char* s1 ; char* s2 ; s1 = "FIRST NAME"; s2 = "LAST NAME"; strcpy(s1,s2); printf("%s %s n",s1,s2);} |
5)
int main{ struct Student { int a; char b; char c; float f; }s1; printf("%dn",sizeof(s1));} |
6)
int main{ struct Student { short a[5]; union Student { long c; float f; }u1; }s1; printf("%dn",sizeof(s1));} |
7)
int main(){ for (i=0; i<=2; i++) for (j=0; j<=i; j++) for(k=0; k<=j; k++) printf(""hello world");} |
8)
int main(){ for (count=5; sum+=--count; ) printf("%d n",sum);} |
9)
int main(){ int i=0; while (i<10); print("hello world")'} |
10)
int main(){ (x && (x&(x-1))) --- indicates what?} |
some more on pointers, preprocessors and static
If you like GeeksQuiz and would like to contribute, you can also write an article and mail your article to review-team@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.








Please Login to comment...