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

Q361.
Which bitwise operator is suitable for checking whether a particular bit is on or off?
Discuss
Answer: (b).& operator
Q362.
Assunming, integer is 2 byte, What will be the output of the program?
#include<stdio.h>

int main()
{
    printf("%x\n", -1>>1);
    return 0;
}
Discuss
Answer: (a).ffff
Q363.
If an unsigned int is 2 bytes wide then, What will be the output of the program ?
#include<stdio.h>

int main()
{
    unsigned int m = 32;
    printf("%x\n", ~m);
    return 0;
}
Discuss
Answer: (c).ffdf
Q364.
Assuming a integer 2-bytes, What will be the output of the program?
#include<stdio.h>

int main()
{
    printf("%x\n", -1<<3);
    return 0;
}
Discuss
Answer: (b).fff8
Q365.
If an unsigned int is 2 bytes wide then, What will be the output of the program ?
#include<stdio.h>

int main()
{
    unsigned int a=0xffff;
    ~a;
    printf("%x\n", a);
    return 0;
}
Discuss
Answer: (a).ffff
Q366.
What will be the output of the program?
#include<stdio.h>

int main()
{
    unsigned char i = 0x80;
    printf("%d\n", i<<1);
    return 0;
}
Discuss
Answer: (b).256
Q367.
What will be the output of the program?
#include<stdio.h>

int main()
{
    printf("%d >> %d %d >> %d\n", 4 >> 1, 8 >> 1);
    return 0;
}
Discuss
Answer: (c).2 >> 4 Garbage value >> Garbage value
Q368.
What will be the output of the program?
#include<stdio.h>

int main()
{
    char c=48;
    int i, mask=01;
    for(i=1; i<=5; i++)
    {
        printf("%c", c|mask);
        mask = mask<<1;
    }
    return 0;
}
Discuss
Answer: (b).12480
Q369.
What will be the output of the program?
#define P printf("%d\n", -1^~0);
#define M(P) int main()             {                P                return 0;             }
M(P)

a.

1

b.

0

c.

-1

d.

2

Discuss
Answer: (b).0
Q370.
What will be the output of the program ?
#include<stdio.h>

int main()
{
    int i=32, j=0x20, k, l, m;
    k=i|j;
    l=i&j;
    m=k^l;
    printf("%d, %d, %d, %d, %d\n", i, j, k, l, m);
    return 0;
}
Discuss
Answer: (c).32, 32, 32, 32, 0

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!