Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
C
→
Dynamic Memory Allocation in C
→
#include <stdio.h>int main(){int y = 0;int x...
1.
#include <stdio.h>int main(){int y = 0;int x = (~y == 1);printf("%d", x);return 0;}(A) 0(B) 1(C) A bog negative Number(D) Compiler Error
Answer»
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
Predict the output of following program?# include <stdio.h>int main(){int x = 10;int y = 20;x += y += 10;printf (" %d %d", x, y);return 0;}(A) 40 20(B) 40 30(C) 30 30(D) 30 40
#include <stdio.h>int main(){int x = 10;int y = (x++, x++, x++);printf("%d %d\n", x, y);return 0;}(A) 13 12(B) 13 13(C) 10 10(D) Compiler Dependent
#include <stdio.h>int main(){int y = 0;int x = (~y == 1);printf("%d", x);return 0;}(A) 0(B) 1(C) A bog negative Number(D) Compiler Error
#include<stdio.h>int main(){int a = 2,b = 5;a = a^b;b = b^a;printf("%d %d",a,b);return 0;}(A) 5 2(B) 2 5(C) 7 7(D) 7 2
(A) 0(B) 1(C) 5(D) Compiler Error
#include <stdio.h>int main(){int a = 10, b = 20, c = 30;if (c > b > a)printf("TRUE");elseprintf("FALSE");return 0;}(A) TRUE(B) FALSE(C) Compiler Error(D) Output is compiler dependent
#include <stdio.h>int main(){int i = 3;printf("%d", (++i)++);return 0;}What is the output of the above program?(A) 3(B) 4(C) 5(D) Compile-time error
What is the output of below program?#include <stdio.h>int foo(int* a, int* b){int sum = *a + *b;*b = *a;return *a = sum - *b;}int main(){int i = 0, j = 1, k = 2, l;l = i++ || foo(&j, &k);printf("%d %d %d %d", i, j, k, l);return 0;}(A) 1 2 1 1(B) 1 1 2 1(C) 1 2 2 1(D) 1 2 2 2
Predict the output of the below program:#include <stdio.h>int main(){printf("%d", 1 << 2 + 3 << 4);return 0;}(A) 112(B) 52(C) 512(D) 0
(A) 1(B) 3(C) Garbage value(D) Compile time error
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