Aptitude Test C Programming For Data Types in on October 29, 2019 April 20, 2020 Share Facebook Twitter Pinterest Email 0 Welcome to Your Quiz: Aptitude Test C Programming For Data Types Name Email 1. What is the output of this C code? int main() { char chr; chr = 128; printf("%d\n", chr); return 0; }0-128128None of the mentioned2. What is the output of this C code? int main() { float x = 'a'; printf("%f", x); return 0; }run time error97.000000aa.0000003. Which of the following is a User-defined data type?struct {char name[10], int age};All of the mentionedtypedef int Boolean;typedef enum {Mon, Tue, Wed, Thu, Fri} Workdays;4. Select the odd one out with respect to type?doubleintcharfloat5. What is the output of this C code? int main() { float a = 5.477777777777; printf("%f", a); }5.485.4777775.4777785.4776. %f access specifier is used for?float typecharacter typeInteger typeNone of the above7. What is the size of float in a 32-bit compiler?48218. Which is correct with respect to size of the datatypes?int > char > floatchar < int < doublechar > int > floatdouble > char > int9. The number of digits present after decimal in float is________.4161610. What is the size of an int data type?4 BytesDepends on the system/compiler8 Bytes2 Bytes11. The format identifier ‘%i’ is also used for _____ data type?doublefloatintchar12. Which of the datatypes have size that is variable?structintfloatdouble13. Which of the following % operation is invalid?Both (b) and (c)4 % 8l;4 % 8;4 % 8f;14. Comment on the output of this C code? int main() { float f1 = 0.1; if (f1 == 0.1) printf("equal\n"); else printf("not equal\n"); }not equalequalOutput depends on compilerNone of the mentioned15. Which data type is most suitable for storing a number 65000 in a 32-bit system?longintdoubleshort16. Comment on the output of this C code? int main() { float f1 = 0.1; if (f1 == 0.1f) printf("equal\n"); else printf("not equal\n"); }not equalOutput depends on compilerequalNone of the mentioned17. What is short int in C programming?All of the mentionedQualifierBasic datatype of Cshort is the qualifier and int is the basic datatype18. What is the output of this C code (on a 32-bit machine)? int main() { int x = 10000; double y = 56; int *p = &x; double *q = &y; printf("p and q are %d and %d", sizeof(p), sizeof(q)); return 0; }Compiler errorp and q are 2 and 8p and q are 4 and 8p and q are 4 and 419. Comment on the output of this C code? int main() { int a[5] = {1, 2, 3, 4, 5}; int i; for (i = 0; i < 5; i++) if ((char)a[i] == '5') printf("%d\n", a[i]); else printf("FAIL\n"); }Program will compile and print the output 5Program will compile and print FAIL for 5 timesProgram will compile and print the ASCII value of 5The compiler will flag an error20. Loss in precision occurs for typecasting from____________.long to floatfloat to intchar to shortfloat to doubleThank You for Submitting your response for QuizAptitude Test C Programming For Data TypesPlease click on View Result Button to see the Result. Time is Up!(Visited 132 times, 1 visits today) Share This Previous Post← Aptitude Test C Programming For Freshers Students Aptitude Test C Programming For Freshers Students Next PostAptitude Test C Programming For Constants → Aptitude Test C Programming For Constants