Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Expressions Questions
Which of the following is the correct order if calling functions in the below code? a = f1(23, 14) * f2(12/4) + f3();
Which of the following are unary operators in C? 1. ! 2. sizeof 3. ~ 4. &&
Which of the following is the correct order of evaluation for the below expression? z = x + y * z / 4 % 2 - 1
Which of the following correctly shows the hierarchy of arithmetic operations in C?
In which order do the following gets evaluated 1. Relational 2. Arithmetic 3. Logical 4. Assignment
Which of the following is the correct usage of conditional operators used in C?
What will be the output of the program? #include<stdio.h> int main() { int i=4, j=-1, k=0, w, x, y, z; w = i || j || k; x = i && j && k; y = i || j &&k; z = i && j || k; printf("%d, %d, %d, %d\n", w, x, y, z); return 0; }
What will be the output of the program? #include<stdio.h> int main() { char ch; ch = 'A'; printf("The letter is"); printf("%c", ch >= 'A' && ch <= 'Z'? ch + 'a' - 'A':ch); printf("Now the letter is"); printf("%c\n", ch >= 'A' && ch <= 'Z'? ch : ch + 'a' - 'A'); return 0; }
What will be the output of the program? #include<stdio.h> int main() { int x=12, y=7, z; z = x!=4 || y == 2; printf("z=%d\n", z); return 0; }
What will be the output of the program? #include<stdio.h> int main() { int i=-3, j=2, k=0, m; m = ++i && ++j || ++k; printf("%d, %d, %d, %d\n", i, j, k, m); return 0; }
What will be the output of the program? #include<stdio.h> int main() { int i=2; int j = i + (1, 2, 3, 4, 5); printf("%d\n", j); return 0; }
What will be the output of the program? #include<stdio.h> int main() { int k, num=30; k = (num>5? (num <=10? 100 : 200): 500); printf("%d\n", num); return 0; }
What will be the output of the program? #include<stdio.h> int main() { int i=-3, j=2, k=0, m; m = ++i || ++j && ++k; printf("%d, %d, %d, %d\n", i, j, k, m); return 0; }
What will be the output of the program? #include<stdio.h> int main() { static int a[20]; int i = 0; a[i] = i ; printf("%d, %d, %d\n", a[0], a[1], i); return 0; }
Assuming, integer is 2 byte, What will be the output of the program? #include<stdio.h> int main() { printf("%x\n", -2<<2); return 0; }
What will be the output of the program? #include<stdio.h> int main() { int x=4, y, z; y = --x; z = x--; printf("%d, %d, %d\n", x, y, z); return 0; }
What will be the output of the program? #include<stdio.h> int main() { int i=3; i = i++; printf("%d\n", i); return 0; }
What will be the output of the program? #include<stdio.h> int main() { int x=55; printf("%d, %d, %d\n", x<=55, x=40, x>=10); return 0; }
What will be the output of the program? #include<stdio.h> int main() { int a=100, b=200, c; c = (a == 100 || b > 200); printf("c=%d\n", c); return 0; }
What will be the output of the program? #include<stdio.h> int main() { int i=-3, j=2, k=0, m; m = ++i && ++j && ++k; printf("%d, %d, %d, %d\n", i, j, k, m); return 0; }
1
2