C Programming - Bitwise Operators - Discussion

Discussion Forum : Bitwise Operators - Find Output of Program (Q.No. 7)
7.
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;
}
12400
12480
12500
12556
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
70 comments Page 7 of 7.

Gayatree verma said:   1 decade ago
Thanks amey and sai.

Ashwin said:   1 decade ago
Explanation. Please?

Ruhee said:   7 years ago
Thanks @Jayadeep.

Jhansi said:   1 decade ago
Thanks alot sai.

Vraj shah said:   1 decade ago
Thanks amey :).

Padma said:   7 years ago
Thank You @Sai.

Neha said:   7 years ago
Thanks @Amey.

Samatha said:   1 decade ago
Well. Thanku.

Ravi said:   1 decade ago
Thanks sai.

Sneha said:   1 decade ago
Thanks sai.


Post your comments here:

Your comments will be displayed after verification.