100+ C Language Solved MCQs

Which of the following is not a valid variable name declaration?

Which of the following is not a valid variable name declaration?

Why do variable names beginning with the underscore is not encouraged?

All keywords in C are in ____________

Variable name resolution (number of significant characters for the uniqueness of variable) depends on ___________

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

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

What is short int in C programming?

The format identifier ‘%i’ is also used for _____ data type.

Which data type is most suitable for storing a number 65000 in a 32-bit system?

Which of the following is a User-defined data type?

What is the size of an int data type?

enum types are processed by _________

Which of the following statement is false?

Which of the following declaration is not supported by C?

Which of the following declaration is illegal?

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

Which of the following is not a pointer declaration?

Which of the following statement is false?

A variable declared in a function can be used in main().

What is the precedence of arithmetic operators (from highest to lowest)?

Which of the following is not an arithmetic operation?

Which of the following data type will throw an error on modulus operation(%)?

Which among the following are the fundamental arithmetic operators, i.e, performing the desired operation can be done using that operator only?

Are logical operator sequence points?

Do logical operators in the C language are evaluated with the short circuit?

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

Relational operators cannot be used on ____________

Which among the following is NOT a logical or relational operator?

What is the type of the following assignment expression if x is of type float and y is of type int? y = x + y;

What will be the value of the following assignment expression? (x = foo())!= 1 considering foo() returns 2

Operation “a = a * b + a” can also be written as ___________

What will be the final value of c in the following C statement? (Initial value: c = 2) c

In expression i = g() + f(), first function called depends on __________

Which operators of the following have same precedence? P. "!=", Q. "+=", R. "

Comment on the following statement n = 1; printf("%d, %dn", 3*n, n++);

Which is correct representation of C statement? e = a * b + c / d * f;

While swapping 2 no’ what at precautions to be taken care? b = (b / a); a = a * b; b = a / b;

function tolower(c) defined in library works for ___________

Which type of conversion is NOT accepted?

Which of the following type-casting have chances for wrap around?

Which of the following typecasting is accepted by C?

When do you need to use type-conversions?

What is the scope of an external variable?

What is the scope of a function?

In the standard library of C programming language, which of the following header file is designed for basic mathematical operations?

Which of the following statements should be used to obtain a remainder after dividing 3.14 by 2.1 ?

By default a real number is treated as a

Chapter: Managing IO Operations

Which among the following is the odd one out?

For a typical program, the input is taken using _________

What does the following command line signify? prog1 prog2

What is the default return-type of getchar()?

What is the value of EOF?

What is the use of getchar()?

Which of the following statement is true?

What is the return value of putchar()?

Escape sequences are prefixed with ________

What is the purpose of sprintf?

The syntax to print a % using printf statement can be done by ________

What are the Properties of the first argument of a printf() functions?

Which of the following function with ellipsis are illegal?

Which of the following data-types are promoted when used as a parameter for an ellipsis?

Which header file includes a function for variable number of arguments?

Which of the following macro extracts an argument from the variable argument list (ie ellipsis) and advance the pointer to the next argument?

The type va_list in an argument list is used ________

In a variable length argument function, the declaration “…” can _______

Each call of va_arg _______

The standard header _______ is used for variable list arguments (…) in C.

What is the purpose of va_end?

Which of the following is NOT a delimiter for an input in scanf?

If the conversion characters of int d, i, o, u and x are preceded by h, it indicates?

Which of the following doesn’t require an & for the input in scanf()?

Which of the following is an invalid method for input?

Which of the following represents the function for scanf()?

What does scanf() function return?

The conversion characters d, i, o, u, and x may be preceded by h in scanf() to indicate?

The syntax of printf() function is printf(“control string”, variable list) ;what is the prototype of the control string?

The parameter control string in the printf () is a C String that contains text to be __________

Output justification such as decimal point, numerical sign, trailing zeros or octal are specified.

What symbol is used to Left-justify within the data given field width?

What specifies the minimum number of characters to print after being padded with zeros or blank spaces?

The maximum number of characters to be printed is specified by __________

________is used to define the type and the interpretation of the value of the corresponding argument.

A conversion specification %7.4f means ____________

Choose the correct description for control string %-+7.2f.

What error is generated on placing an address operator with a variable in the printf statement?

If by mistake you specify more number of arguments, the excess arguments will ____________

What happens when zero flag is used with left justification?

For floating point numbers, the precision flag specifies the number of decimal places to be printed. When no precision modifier is specified, printf() prints _______

What will the given code result in printf(“\n you are\”awesome \" ");?

What will be the output for the given code printf(“\n The number is %07d”,1212);

The syntax of the scanf() is scanf(“control string “, arg1,arg2,arg3,….,argn); the prototype of control string is ____________

What is the use of symbol * in the control string as shown [=%[*][width] [modifiers] type=]?

What action is carried out by scanf if a user enters any blank spaces, tabs, and newlines?

What error will generate if the read and write parameters are not separated by commas?

_____ is an optional argument that gives the maximum number of characters to be read.

Explain the format string "%5d%s %c"

Select the correct value of i from given options i=scanf("%d %d", &a, &b);

If the user enters 1 3.2 s, what value will be returned by the scanf()?scanf("%d %f %c", &s1, &s2, &s3);

If the user enters 1 s 3.2, what value will be returned by the scanf()?scanf("%d %f %c", &a, &b, &c);

Your recent visits

McqMate.com is an educational platform, Which is developed BY STUDENTS, FOR STUDENTS, The main objective of our platform is to assist fellow students in preparing for exams and in their Studies throughout their Academic career.

MCQMATE IS ALSO AVAILABLE ON