adplus-dvertising

Welcome to the Data Types,Operators and Expressions in C MCQs Page

Dive deep into the fascinating world of Data Types,Operators and Expressions in C with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of Data Types,Operators and Expressions in C, a crucial aspect of C Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of Data Types,Operators and Expressions in C, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within C Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through Data Types,Operators and Expressions in C. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of C Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of Data Types,Operators and Expressions in C. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

Data Types,Operators and Expressions in C MCQs | Page 3 of 66

Explore more Topics under C Programming

Q21.
Comment on the output of this C code?
#include <stdio.h>
    int main()
    {
        float f1 = 0.1;
        if (f1 == 0.1f)
            printf("equal\n");
        else
            printf("not equal\n");
    }
Discuss
Answer: (a).equal
Q22.
What is the output of this C code (on a 32-bit machine)?
#include <stdio.h>
    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;
    }
Discuss
Answer: (a).p and q are 4 and 4
Q23.
What is the output of the following C code(on a 64 bit machine)?
#include <stdio.h>
    union Sti
    {
        int nu;
        char m;
    };
    int main()
    {
        union Sti s;
        printf("%d", sizeof(s));
        return 0;
    }

a.

8

b.

5

c.

9

d.

4

Discuss
Answer: (d).4
Q24.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        float x = 'a';
        printf("%f", x);
        return 0;
    }
Discuss
Answer: (d).97.000000
Q25.
Which of the datatypes have size that is variable?
Discuss
Answer: (b).struct
Q26.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        enum {ORANGE = 5, MANGO, BANANA = 4, PEACH};
        printf("PEACH = %d\n", PEACH);
    }
Discuss
Answer: (c).PEACH = 5
Q27.
For the following code snippet:

char *str = β€œcompscibits.com\0” β€œtraining classes”;
The character pointer str holds reference to string:
Discuss
Answer: (b).compscibits.com\0training classes
Q28.
What is the output of this C code?
#include <stdio.h>
    #define a 10
    int main()
    {
        const int a = 5;
        printf("a = %d\n", a);
    }
Discuss
Answer: (c).Compilation error
Q29.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int var = 010;
        printf("%d", var);
    }

a.

2

b.

8

c.

9

d.

10

Discuss
Answer: (b).8
Q30.
What is the output of this C code?
#include <stdio.h>
    enum birds {SPARROW, PEACOCK, PARROT};
    enum animals {TIGER = 8, LION, RABBIT, ZEBRA};
    int main()
    {
        enum birds m = TIGER;
        int k;
        k = m;
        printf("%d\n", k);
        return 0;
    }
Discuss
Answer: (d).8

Suggested Topics

Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.

Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!