iGET

Computer Knowledge - MCQ Practice Questions

Computer Science questions in competitive exams stay close to fundamentals, which is good news if you revise the right five subjects. Coverage includes data structures, algorithms and complexity, operating systems, database management systems, computer networks, and computer organisation. Explanations show the trace or the state table where one helps, since seeing the intermediate steps is what makes the concept stick.

304 questions | 100% Free

Q.41Medium

In C, what does the scanf() function do?

Q.42Medium

What will be the output of: for(int i = 0; i < 3; i++) { printf("%d ", i); }?

Q.43Medium

Which of the following is the correct way to define a function that takes no parameters and returns no value?

Q.44Medium

What is the output of the following program: int x = 5; if(x > 3) printf("Greater"); else printf("Smaller");?

Q.45Medium

What is the return type of the malloc() function?

Q.46Medium

Which function is used to release dynamically allocated memory in C?

Q.47Medium

What is the difference between calloc() and malloc()?

Q.48Medium

Which of the following is used to comment multiple lines in C?

Q.49Medium

What will be the output of: float x = ; printf("%f", x);

Q.50Medium

How are structures different from unions in C?

Q.51Medium

What will be the output of the following code?
int a = 5;
int b = ++a + a++;
printf("%d", b);

Q.52Medium

What will be the output of: int x = 5; printf("%d", x << 1);

Q.53Medium

Consider the code: int arr[10]; int *p = arr; What is p[5]?

Q.54Medium

What is the purpose of the void pointer in C?

Q.55Medium

Which function is used to read a string from standard input?

Q.56Medium

What is the output of: int arr[] = {1,2,3,4,5}; printf("%d", sizeof(arr)/sizeof(arr[0]));

Q.57Medium

What will be the output of: char c = 'A'; printf("%d", c);

Q.58Medium

What is the output of: int arr[5]; printf("%d", sizeof(arr));

Q.59Medium

Which function is used to allocate memory dynamically at runtime?

Q.60Medium

What is the purpose of the break statement in a switch case?