Data Types and Operator _ DPP 02
Data Types and Operator _ DPP 02
GATE
https://qbg-admin.penpencil.co/finalize-question-paper/print-preview 1/5
1/17/25, 6:12 PM GATE_Computer Science & Information Technology_DPP 2
GATE
} }
(A) 440 (B) 360
Q9 Consider the following code snippet:
(C) 584 (D) 784
#include <stdio.h>
Q7 Consider the following code: int main()
#include <stdio.h> {
int main() int x = 5, y = 10;
{ int result = (x > 3 && y < 20) || (x++ > 5);
unsigned int x = 34, y = 15; printf("%d %d\n", result, x);
int result = (x & y) ^ (x | y); return 0;
printf("%d\n", result); }
return 0; What is the output of the program?
} (A) 15 (B) 05
What will be the output of the program? (C) 16 (D) 06
(A) 15 (B) 30
Q10 What will the following code output?
(C) 45 (D) 60
#include <stdio.h>
Q8 What will be the output of the following code ? int main()
#include <stdio.h> {
int main() int a = 4, b = -3, c = 0;
{ int result = a || b && c;
int a = 10, b = 0, c = – 5; printf("%d\n", result);
int result = a && b || c; return 0;
printf("%d\n", result); }
return 0;
https://qbg-admin.penpencil.co/finalize-question-paper/print-preview 2/5
1/17/25, 6:12 PM GATE_Computer Science & Information Technology_DPP 2
GATE
Answer Key
Q1 (A) Q6 (C)
Q2 275 Q7 (C)
Q3 (D) Q8 1
Q4 (C) Q9 (A)
Q5 (A) Q10 1
https://qbg-admin.penpencil.co/finalize-question-paper/print-preview 3/5
1/17/25, 6:12 PM GATE_Computer Science & Information Technology_DPP 2
GATE
https://qbg-admin.penpencil.co/finalize-question-paper/print-preview 4/5
1/17/25, 6:12 PM GATE_Computer Science & Information Technology_DPP 2
GATE
https://qbg-admin.penpencil.co/finalize-question-paper/print-preview 5/5