Explore topic-wise MCQs in Technical MCQs.

This section includes 6 Mcqs, each offering curated multiple-choice questions to sharpen your Technical MCQs knowledge and support exam preparation. Choose a topic below to get started.

1.

When do you need to use type-conversions?

A. The value to be stored is beyond the max limit
B. The value to be stored is in a form not supported by that data type
C. To reduce the memory in use, relevant to the value
D. All of the above
E.
Answer» E.
2.

In Implicit type conversion, If an operand of type long double is present in the expression, then the corresponding operand will also be converted to?

A. double
B. long double
C. int
D. float
Answer» C. int
3.

#include<stdio.h> int main() {     double x = 1.2;     int sum = (int)x + 1;       printf(""sum = %d"", sum);       return 0; } 
6.In Implicit type conversion, If an operand of long int is present then the other operand will be converted to ?

A. unsigned int
B. unsigned long int
C. float
D. long int
Answer» E.
4.

#include<stdio.h> int main() {     int x = 10;        char y = 'a';     x = x + y;          float z = x + 1.0;       printf(""x = %d, z = %f"", x, z);     return 0; } 
5.What will be output for the following code?

A. sum = 2
B. sum = 1
C. sum = 0
D. sum = 3
Answer» B. sum = 1
5.

double da = 4.5;double db = 4.6;double dc = 4.9;//explicitly defined by userint result = (int)da + (int)db + (int)dc; printf(""result = %d"", result);
4.What will be output for the following code?

A. x = 107, z = 108.00
B. x = 107, z = 108.0000
C. x = 107, z = 108.000000
D. x = 108, z = 108.000000
Answer» D. x = 108, z = 108.000000
6.

The following code is an example of?

A. Implicit Type Conversion
B. Explicit Type Conversion
C. Error
D. Can not Say
Answer» C. Error