MCQOPTIONS
Bookmark
Saved Bookmarks
→
Huawei
→
Aptitude & Logical - Huawei
→
What is the value of variable POLYGON? main ( )...
1.
What is the value of variable POLYGON? main ( ) { int POLYGON, L, B; L = B = 2; POLYGON = (L == B)? 1:0; }
A.
0
B.
1
C.
2
D.
0.5
Answer» C. 2
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
What will be the output of the program ? #include int main() { int arr[5], i=0; while(i<5) arr[i]=++i; for(i=0; i<5; i++) printf(“%d, “, arr[i]); return 0; }
If the size of an integer is 4 bytes, What will be the output of the program ? #include #include int main() { printf(“%dn”, strlen(“123456”)); return 0; }
What will be the output of the program? #include int main() { float f=43.20; printf(“%e, “, f); printf(“%f, “, f); printf(“%g”, f); return 0; }
What will be the output of the program? #include int main() { float a=0.7; if(a < 0.7f) printf(“Cn”); else printf(“C++n”); return 0; }
What will be the output of the program? #include #include int main() { float n=1.54; printf(“%f, %fn”, ceil(n), floor(n)); return 0; }
What will be the output of the program? #include int main() { float d=2.25; printf(“%e,”, d); printf(“%f,”, d); printf(“%g,”, d); printf(“%lf”, d); return 0; }
Point out the error in the program #include #define SI(p, n, r) float si; si=p*n*r/100; int main() { float p=2500, r=3.5; int n=3; SI(p, n, r); SI(1500, 2, 2.5); return 0; }
Point out the error in the program #include int main() { int i; #if A printf(“Enter any number:”); scanf(“%d”, &i); #elif B printf(“The number is odd”); return 0; }
What will be the output of the program ? #include #include int main() { char str1[20] = “Hello”, str2[20] = ” World”; printf(“%sn”, strcpy(str2, strcat(str1, str2))); return 0; }
What will be the output of the program ? #include int main() { char p[] = “%dn”; p[1] = ‘c’; printf(p, 65); return 0; }
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies