Q1
Which one of the given options is appropriate to fill the blank?
Show answer without attempting
Answer: A
GATE CS · 10 February 2024 · Slot 1 · 65 questions
Every question from the GATE CS 2024 CS-1 paper held on 10 February 2024, in the order it was printed, with the official answer key. Pick an option, or type the number for numerical-answer questions, and it is marked straight away with GATE marking: 1 or 2 marks, −⅓ or −⅔ for a wrong MCQ, no negative marks for MSQ and NAT.
Answer: A
Answer: D
Answer: A
Answer: C
Answer: A
Answer: C
Answer: A

Answer: C
Answer: A

Answer: A
Answer: D
Answer: B
Answer: B
Answer: B
Answer: C
Answer: C
Answer: A
#include <stdio.h>
int main(){
int a = 6;
int b = 0;
while(a < 10) {
a = a / 12 + 1;
a += b;
}
printf("%d", a);
return 0;
}Answer: C
#include <stdio.h>
void fX();
int main(){
fX();
return 0;
}
------------------------
void fX(){
char a;
if((a=getchar()) != '\n')
fX();
if(a != '\n')
putchar(a);
}1234 followed by a newline character. Which one of the following statements is CORRECT?Answer: C
Answer: D
Answer: A
Answer: A, C
Answer: C, D
Answer: D
Answer: B, C
Answer: A, D
Answer: B, C

Answer: A, C
Answer: A, D
Answer: A, B, C
Answer: A, C
Answer: 2
| Operator | Precedence | Associativity |
|---|---|---|
| + | Highest | Left |
| - | High | Right |
| * | Medium | Right |
| / | Low | Right |
Answer: 6
Answer: 16


Answer: 2
Answer: B
Answer: A
Answer: A
Answer: D
Answer: A
Answer: D
Answer: A
Answer: A
Answer: B, C, D
Answer: C
Answer: B, C, D
Answer: A, B
int f(int x, int y) {
for (int i=0; i<y; i++) {
x=x+x+y;
}
return x;
}Answer: B, D
Answer: A

Answer: B, C
Answer: B, C
Answer: B, D
Answer: B, C
Answer: 4096
Answer: 3
Answer: 3.00
fork() and wait() system calls. Assume that the code compiles and runs correctly, and that the system calls run successfully without any errors.int x = 3;
while(x > 0) {
fork();
printf("hello");
wait(NULL);
x--;
}printf statement is executed is _______Answer: 14

Answer: 40
Answer: 179
Answer: 60
Answer: 44
Answer: 6596
Answer: 0.370 to 0.380

Answer: 4
Answer: 6
0/650 correct0 marks