what will be the output for the following program?

main()
{
char ch = 'k';
char c;
printf("%c",c);
}

Answers were Sorted based on User's Feedback



what will be the output for the following program? main() { char ch = 'k'; char..

Answer / hussain reddy

garbage value

Is This Answer Correct ?    2 Yes 0 No

what will be the output for the following program? main() { char ch = 'k'; char..

Answer / sudarsan

no out put
bcz
after declaration, inside the memory
1. a location of 1byte will be reserve for ch

and also for c but the value k be store in ch
and nothing in C.
|----|
|k |ch
|----|


|----|
| |c
|----|

Is This Answer Correct ?    3 Yes 1 No

what will be the output for the following program? main() { char ch = 'k'; char..

Answer / akansha

there vl b no result.......

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More C Interview Questions

Sir i want e-notes of C languge of BAlaguruswami book i.e scanned or pdf file of balaguruswamy book on c language.PLEASE SEND ME on my mail id ajit_kolhe@rediff.com

8 Answers  


What is main return c?

0 Answers  


Write the program for displaying the ten most frequent words in a file such that your program should be efficient in all complexity measures.

3 Answers   Google,


What is the size of a union variable?

0 Answers  


Write the Program to reverse a string using pointers.

0 Answers   InterGraph,






what is difference between procedural language and functional language ?

4 Answers   Wipro,


1. What will be the output of the following programs. a) #include <stdio.h> Main() { Int x=4; While(x==1) { X=x-1; Printf(ā€œ%dā€,x); --x; } }

7 Answers   CSC,


Write a program that accepts a string where multiple spaces are given in between the words. Print the string ignoring the multiple spaces. Example: Input: ā€œ We.....Are....Student ā€œ Note: one .=1 Space Output: "We Are Student"

6 Answers   IBM,


int main(){ float f=8.0; if(f==8.0) printf("good"); else printf("bad"); } what is the answere and explain it?

3 Answers  


what does the following function print? func(int i) { if(i%2)return 0; eale return 1; } main() { int =3; i=func(i); i=func(i); printf("%d",i);}

9 Answers   TCS,


Explain continue keyword in c

0 Answers  


What does return 1 means in c?

0 Answers  


Categories