/40
0 votes, 0 avg
3
Created on

C Programming MCQ type Online Test

C Programming Online test, Duration: 80 Mins.

1 / 40

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

2 / 40

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

3 / 40

The C compiler used for UNIX operating system is

 

 

4 / 40

Which of the following is not an operator in C?

5 / 40

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

6 / 40

Which of the following are C preprocessors?

7 / 40

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

8 / 40

What is short int in C programming?

9 / 40

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

10 / 40

Which of following is not accepted in C?

11 / 40

Which of the following is true about C Programming?

 

12 / 40

What is an example of iteration in C?

13 / 40

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

14 / 40

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

15 / 40

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

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

16 / 40

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

 

17 / 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");

}

18 / 40

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

 

19 / 40

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

20 / 40

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

21 / 40

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

22 / 40

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

 

23 / 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;
    }

24 / 40

The C-preprocessors are specified with _________symbol.

25 / 40

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

 

26 / 40

Will the following C code compile without any error?

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

27 / 40

What is #include ?

28 / 40

Single line comment in C language begins with _______

 

29 / 40

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

30 / 40

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

 

31 / 40

All keywords in C are in ____________

32 / 40

Who is the father of C language?

33 / 40

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

34 / 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);

}

35 / 40

C preprocessors can have compiler specific features.

36 / 40

Functions in C Language are always _________

37 / 40

scanf() is a predefined function in______header file.

38 / 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);
    }

 

39 / 40

Functions can return enumeration constants in C?

40 / 40

Which of the following is a logical AND operator?

 

Your score is

0%

Please rate this quiz

Copyright © 2021. All rights reserved.