Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

What does the following C expression do? x = x & (x-1) (A) Sets all bits as 1(B) Makes x equals to 0(C) Turns of the rightmost set bit(D) Turns of the leftmost set bit

Answer»
2.

What is the return value of following function for arr[] = {9, 12, 2, 11, 2, 2, 10, 9, 12, 10, 9, 11, 2} and n is size of this array.int fun(int arr[], int n){int x = arr[0];for (int i = 1; i < n; i++)x = x ^ arr[i];return x;}(A) 0(B) 9(C) 12(D) 2

Answer» None
3.

What does the following C expression do?x = (x<<1) + x + (x>>1);(A) Multiplies an integer with 7(B) Multiplies an integer with 3.5(C) Multiplies an integer with 3(D) Multiplies an integer with 8

Answer»