## C | Input and Output | Question 9

What does the following C statement mean? filter_none edit close play_arrow link brightness_4 code scanf(“%4s”, str); chevron_right filter_none (A) Read exactly 4 characters from console.… Read More »

## C | String | Question 12

Output of following program filter_none edit close play_arrow link brightness_4 code #include <stdio.h> int fun(char *p) {     if (p == NULL || *p == ‘\0’)… Read More »

## C | Advanced Pointer | Question 4

filter_none edit close play_arrow link brightness_4 code #include <stdio.h>    char *c[] = {“GeksQuiz”, “MCQ”, “TEST”, “QUIZ”}; char **cp[] = {c+3, c+2, c+1, c}; char… Read More »

## C | Operators | Question 26

What does the following statement do? filter_none edit close play_arrow link brightness_4 code x  = x | 1 << n; chevron_right filter_none (A) Sets x… Read More »

## C | Advanced Pointer | Question 3

filter_none edit close play_arrow link brightness_4 code #include <stdio.h> int main() {     int a[5] = {1,2,3,4,5};     int *ptr = (int*)(&a+1);     printf(“%d %d”, *(a+1), *(ptr-1));     return… Read More »

## C | Structure & Union | Question 9

filter_none edit close play_arrow link brightness_4 code # include <iostream> # include <string.h> using namespace std;    struct Test {   char str[20]; };    int… Read More »

## C | Pointer Basics | Question 14

Predict the output of following program filter_none edit close play_arrow link brightness_4 code #include<stdio.h> int main() {     int a = 12;     void *ptr = (int… Read More »

## C | Macro & Preprocessor | Question 11

What is the use of “#pragma once”? (A) Used in a header file to avoid its inclusion more than once. (B) Used to avoid multiple… Read More »

## C | Dynamic Memory Allocation | Question 6

Which of the following is true? (A) “ptr = calloc(m, n)” is equivalent to following ptr = malloc(m * n); (B) “ptr = calloc(m, n)”… Read More »

## C | Data Types | Question 4

Predict the output of following C program filter_none edit close play_arrow link brightness_4 code #include <stdio.h> int main() {     char a = ‘\012’;        printf(“%d”,… Read More »

## C | Dynamic Memory Allocation | Question 5

What is the return type of malloc() or calloc() (A) void * (B) Pointer of allocated memory type (C) void ** (D) int * Answer:… Read More »

## C | Structure & Union | Question 8

filter_none edit close play_arrow link brightness_4 code union test {     int x;     char arr[4];     int y; };    int main() {     union test t;     t.x… Read More »

## C | Structure & Union | Question 7

filter_none edit close play_arrow link brightness_4 code union test {     int x;     char arr[8];     int y; };    int main() {     printf(“%d”, sizeof(union test));     return… Read More »

## C | Structure & Union | Question 6

Which of the following operators can be applied on structure variables? (A) Equality comparison ( == ) (B) Assignment ( = ) (C) Both of… Read More »

## C | Storage Classes and Type Qualifiers | Question 17

Output? filter_none edit close play_arrow link brightness_4 code #include <stdio.h>    int main(void) {     int i = 10;     const int *ptr = &i;     *ptr =… Read More »