/40
0 votes, 0 avg
3
Created on

C Programming MCQ type Online Test

C Programming Online test, Duration: 80 Mins.

1 / 40

. Which of the following is not a valid C variable name?

2 / 40

The C-preprocessors are specified with _________symbol.

3 / 40

What is #include ?

4 / 40

scanf() is a predefined function in______header file.

5 / 40

Functions can return enumeration constants in C?

6 / 40

Which of the following declaration is not supported by C language?

7 / 40

Will the following C code compile without any error?

    #include 
    int main()
    {
        for (int k = 0; k < 10; k++);
            return 0;
    }

8 / 40

Which of the following is a logical AND operator?

 

9 / 40

How many number of pointer (*) does C have against a pointer variable declaration?

10 / 40

What will be the output of the following C code? (Initial values: x= 7, y = 8)

    #include 
    void main()
    {
        float x;
        int y;
        printf("enter two numbers \n", x);
        scanf("%f %f", &x, &y);
        printf("%f, %d", x, y);
    }

 

11 / 40

Which of the following is not an operator in C?

12 / 40

Which of the following cannot be a variable name in C?

13 / 40

Which operator can be used for accessing the value stored at address of a pointer variable?

 

14 / 40

Which of the following return-type cannot be used for a function in C?

15 / 40

Which of the following are C preprocessors?

16 / 40

What will be the output of the following C code?

    #include 
    int main()
    {
        int y = 10000;
        int y = 34;
        printf("Hello World! %d\n", y);
        return 0;
    }

17 / 40

Which keyword is used to prevent any changes in the variable within a C program?

18 / 40

Which header file is used to define input/output functions, macros and prototypes?

 

19 / 40

Which of the following is true for variable names in C?

20 / 40

What is the output of below program?

#include

int chk (intint);

 

int main()

{

int x;

x = check(10, 20);

printf("x=%d\n", x);

return 0;

}

int check(int a, int b)

{

int *y, *z;

y=&a;

z=&b;

a>=45 ? return(*y): return(*z);

}

21 / 40

What will be the final value of x in the following C code?

    #include 
    void main()
    {
        int x = 5 * 9 / 3 + 9;
    }

22 / 40

C preprocessors can have compiler specific features.

23 / 40

What is the output of below program?

#include

int j;

int function();

 

int main()

{

while(j)

{

function();

main();

}

printf("Hi\n");

return 0;

}

int function()

{

printf("Hello");

}

24 / 40

What is an example of iteration in C?

25 / 40

Which of the following is true about C Programming?

 

26 / 40

Which of following is not accepted in C?

27 / 40

What is short int in C programming?

28 / 40

All keywords in C are in ____________

29 / 40

Who is the father of C language?

30 / 40

What is the sizeof(char) in a 32-bit C compiler?

31 / 40

When a C program is started, O.S environment is responsible for opening file and providing pointer for that file?

32 / 40

The C compiler used for UNIX operating system is

 

 

33 / 40

In a library of C programming language, which of the following header file is used for performing mathematical operations?

 

34 / 40

Which of the following statement is used to free the allocated memory space for a program?

 

35 / 40

Property which allows to produce different executable for different platforms in C is called?

36 / 40

Where in C the order of precedence of operators do not exist?

37 / 40

Single line comment in C language begins with _______

 

38 / 40

Functions in C Language are always _________

39 / 40

The statement used for printing \n on the screen is:

 

40 / 40

What is the result of logical or relational expression in C?

Your score is

0%

Please rate this quiz

Copyright © 2022. All rights reserved.