[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: Arrays - Discussion

Home > C Programming > Arrays > MCQs Questions Discussion

13 / 55

What is the following 'C' program doing?

#include<stdio.h>
void main ()
{
unsigned int m[] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80};
unsigned char n, i;
scanf("%d", &n);
for (i=0; i <= 7; i++)
{
if(n & m[i])
printf("\nyes");
}}

APutting off all bits which are on in the number n

BTesting whether the individual bits of n are on or off

CThis program would give an error

DNone of these

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

No Discussion on this question yet!