Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.

C Programming :: Basic Concepts

Home > C Programming > Basic Concepts > General Questions

21. What is the output of the following 'C' program?

#include
void main()
{
printf("%c", "abcdefgh"[4]);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

22. What is the output of the following 'C' program ?

#include
void main()
{
char ch = 'A';
printf ("%d%d",sizeof(ch),sizeof('A'));
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

23. What is the output of the following 'C' program?

#include
void main()
{
printf("\n%d%d%d",sizeof("3"),sizeof("3"),sizeof (3));
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

24. What is the output of the following 'C' program?

#include
void main()
{
printf("\n%x", -1 >> 4);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

25. What is the output of the following 'C' program ?

#include
void main()
{
unsigned int num;
int c = 0;
scanf("%u", &num);
for(; num; num >>=1)
{
if(num & 1)
c++;
printf ("%d", c);
}
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

26. What is the output of the following 'C' program?

#include
void main()
{
printf("%d", printf("tim"));
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option B

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

27. What is the output of the following program ?

nt main()
{
char x, y, z;
printf("%d", scanf ("%c%c%c", &x, &y, &z));
return 0;
}

Note: "abc" as input

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

28. What is the output of the following program ?

#include
int main()
{
int a;
if (a=0)
printf("a is zero");
else
printf ("a is not zero");
return 0;
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option C

Explanation:

Here is no explanation for this answer

Workspace

Tags:

No Tags on this question yet!

29. #include
void main()
{
char c=' ',x,convert(z);
getc(c);
if((c>='a') && (c<='z'))
x=convert(c);
printf("%c",x);
}
convert(z)
{
return z-32;
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option D

Explanation:

Declaration of convert and format of getc() are wrong.

Workspace

Tags:

No Tags on this question yet!

30. What is the output of the following C Program?

#include
int swap(int *a,int *b)
{
*a=*a+*b;*b=*a-*b;*a=*a-*b;
}
void main()
{
int x=10,y=20;
swap(&x,&y);
printf("x= %d y = %d\n",x,y);
}

View Answer | Discuss in Forum | Workspace | Asked In |

Answer: Option A

Explanation:

This is one way of swapping two values.

Workspace

Tags:

No Tags on this question yet!