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 17 of 66

Q161.
In expression i = g() + f(), first function called depends on
Discuss
Answer: (a).Compiler
Q162.
What is the value of i and j in the below code?
#include <stdio.h>
    int x = 0;
    int main()
    {
        int i = (f() + g()) || g();
        int j = g() || (f() + g());
    }
    int f()
    {
        if (x == 0)
            return x + 1;
        else
            return x - 1;
    }
    int g()
    {
        return x++;
    }
Discuss
Answer: (d).i and j value are undefined
Q163.
What is the value of i and j in the below code?
#include <stdio.h>
    int x = 0;
    int main()
    {
        int i = (f() + g()) | g(); //bitwise or
        int j = g() | (f() + g()); //bitwise or
    }
    int f()
    {
        if (x == 0)
            return x + 1;
        else
            return x - 1;
    }
    int g()
    {
        return x++;
    }
Discuss
Answer: (c).i value is 1 and j value is undefined
Q164.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int x = 2, y = 0;
        int z = y && (y |= 10);
        printf("%d\n", z);
        return 0;
    }
Discuss
Answer: (b).0
Q165.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int x = 2, y = 0;
        int z = (y++) ? 2 : y == 1 && x;
        printf("%d\n", z);
        return 0;
    }
Discuss
Answer: (b).1
Q166.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int x = 2, y = 0;
        int z;
        z = (y++, y);
        printf("%d\n", z);
        return 0;
    }
Discuss
Answer: (b).1
Q167.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int x = 2, y = 0, l;
        int z;
        z = y = 1, l = x && y;
        printf("%d\n", l);
        return 0;
    }
Discuss
Answer: (b).1
Q168.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int y = 2;
        int z = y +(y = 10);
        printf("%d\n", z);
    }
Discuss
Answer: (b).20
Q169.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int x = 2, y = 2;
        float f = y + x /= x / y;
        printf("%d %f\n", x, f);
        return 0;
    }
Discuss
Answer: (b).Compile time error
Q170.
What is the output of this C code?
#include <stdio.h>
    int main()
    {
        int x = 1, y = 2;
        if (x && y == 1)
            printf("true\n");
        else
            printf("false\n");
    }
Discuss
Answer: (b).false

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!