Verified Jobs Live
Topic Practice Mode

Important C Interview question test Practice Questions (20)

The quiz below provides multiple choice answers for the questions for C Programming language, read the question carefully, and select the correct answer Take a simple C Test and find out your skill levels in C language.

Timed Quiz Mode →
Q1 Medium • TCS, Infosys

What is the problem with the below code? <code>#include <stdio.h> int main() { printf( \"Declare x next\" ); int x; retu 0; }</code>

Q2 Medium • TCS, Infosys

enum x {a=1,b,c,d,f=60,y} printf(\"%d\",y);

Q3 Medium • TCS, Infosys

What is answer for the following code: <code>Struct x { int i; char c; } union y{ struct x a; double d; }; printf(\"%d\",sizeof(union y));</code>

Q4 Medium • TCS, Infosys

<strong>What is the output of the following programme? If we Enter Input as: 6?</strong> <code>#include <stdio.h> int main() { int c, n, fact = 1; printf(\"Enter a number to calculate it\'s factorial\ \"); scanf(\"%d\", &n); for (c = 1; c <= n; c++) fact = fact * c; printf(\"Factorial of %d = %d\ \", n, fact); retu 0; }</code>

Q5 Medium • TCS, Infosys

<strong>Which if statement is correct to find Leap Year!</strong> <code> 1. if ( year%400 == 0) .......... 2. else if ( year%100 == 0) .......... 3. else if ( year%4 == 0 ) .......... 4. else ..........</code>

Q6 Medium • TCS, Infosys

What are the real data types in C language?

Q7 Medium • TCS, Infosys

<strong>What is the output of the following program?</strong> #include<stdio.h> int main() { printf(\"%f\ \", log(46.0)); retu 0; }

Q8 Medium • TCS, Infosys

To Round off a float value to an integer value, what is the correct method?

Q9 Medium • TCS, Infosys

What should be the out of the below C programme? <pre>#include<stdio.h> main() { int i=1; while ( i++<=5) prinf(\"%d \", i++); }</pre>

Q10 Medium • TCS, Infosys

Which statment is true for C Language?

Q11 Medium • TCS, Infosys

What punctuation is used to indicate beginning and end of a code block?

Q12 Medium • TCS, Infosys

The C Compiler generates which file?

Q13 Easy

In ISO C17, given int values[3] = {4, 7, 9}; what is the value of values[0]?

Q14 Easy

In ISO C17, which operator gives the remainder after integer division?

Q15 Easy

In ISO C17, which header declares strlen?

Q16 Easy

In ISO C17, what is the value of 7 / 2 when both operands have type int?

Q17 Medium

In ISO C17, x is initially 0. What happens in the expression x != 0 && 10 / x > 1?

Q18 Medium

In ISO C17, what is sizeof text for char text[] = "cat";? Give the result in C bytes.

Q19 Medium

In ISO C17, which declaration makes p a pointer through which the pointed-to int cannot be modified?

Q20 Medium

In ISO C17, which printf conversion is appropriate for a value of type size_t?