General C
General C
Structure & Execution
C-Tokens
Operators
100

Each statement in a C program should end with.?


Semicolon ;


100

 Who invented C Language.?


 Dennis Ritchie


100

 Directives are translated by the ________

Pre-processor


100

Number of Keywords present in C Language are .?


32

100

What is the output of the following statement

int a = 10 + 4.867;


a = 14


200

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

0 or 1

200

 A C program is a combination of.?


Statements, Functions, Variables

200

A) main()

{

  scanf("Hello World..");

}

B) main()

{

printf("Hello World..");

}

C) main()

{

print("Hello World..");

}

B

200

Size of float, double and long double in Bytes are.?


4, 8, 10


200

In C language, which Operator group has more priority between (*, / and %) and (+, -) groups.?


(*, / and %)


300

What is #include <stdio.h>?

Preprocessor directive

300

Header files in C contain

 Library functions

300

 What is the output of the program.?

int main() {   

 float a = 45;    

printf("%f", a);     

return 0; }


45.000000


300

Every C Variable must have.?


 Both Type and Storage Class


300

What is the syntax for C Ternary Operator 


condition ? expression1 : expression2


400

 C language was invented to develop which Operating System.?


Unix

400

Range of signed char and unsigned char are.?


-128 to +127 

0 to 255


400

 What will be the output of the following C code?

  1.     #include <stdio.h>

  2.     int main()

  3.     {

  4.         int y = 10000;

  5.         int y = 34;

  6.         printf("Hello World! %d\n", y);

  7.         return 0;

  8.     }

Compile time error

400

In the C language, the constant is defined _______.


Anywhere, but starting on a new line.


400

What will be the output of the given statement

printf("%d", (a++))


Value of a


500

What will happen if the following C code is executed?

#include <stdio.h>

int main()

{

        int main = 3;

        printf("%d", main);

        return 0;
    }

3

500

 What is the default C Storage Class for a variable.?


auto

500

 C Language is a successor to which language.?


B Language

500

What will the result of num variable after execution of the following statements?

int num = 58;  

num % = 11;  



3

Explanation: num = 58

num % = 11

num = num % 11

num = 58 % 11

num = 3



500
  1. main()  
  2. {  
  3.   int a = 1, b = 2, c = 3:  
  4.   printf("%d", a + = (a + = 3, 5, a))  
  5. }

8