Computer Knowledge - MCQ Practice Questions
Practice free Computer Knowledge multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.
309 questions | 100% Free
What is the return type of the malloc() function?
Which function is used to release dynamically allocated memory in C?
What is the difference between calloc() and malloc()?
Which of the following is used to comment multiple lines in C?
What will be the output of: float x = ; printf("%f", x);
How are structures different from unions in C?
What will be the output of the following code? int a = 5; int b = ++a + a++; printf("%d", b);
What will be the output of: int x = 5; printf("%d", x << 1);
Consider the code: int arr[10]; int *p = arr; What is p[5]?
What is the purpose of the void pointer in C?
Which function is used to read a string from standard input?
What is the output of: int arr[] = {1,2,3,4,5}; printf("%d", sizeof(arr)/sizeof(arr[0]));
What will be the output of: char c = 'A'; printf("%d", c);
What is the output of: int arr[5]; printf("%d", sizeof(arr));
Which function is used to allocate memory dynamically at runtime?
What is the purpose of the break statement in a switch case?
What will be the output of: int x = 5, y = 10; if (x < y) printf("yes"); else printf("no");
Which of the following is NOT a valid way to pass arguments to a function in C?
What will be the result of: int a = 10, b = 3; int c = a % b; printf("%d", c);
What will be the output of: char ch = 'A'; printf("%d", ch);