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

Discuss similarities and differences of Multiprogramming OS and multiprocessing OS?

4 Answers   TCS,


What is the explanation for modular programming?

0 Answers  


In scanf h is used for

4 Answers   BFL,


What is the best organizational structure?

0 Answers  


What are the various topologies? Which one is the most secure?

2 Answers  


What is the use of printf() and scanf() functions?

0 Answers  


What is 'bus error'?

0 Answers  


write a proram to reverse the string using switch case?

0 Answers   Syntel,


write a program to create a sparse matrix using dynamic memory allocation.

0 Answers  


Write a c program to read a positive number and display it in words.? ex: 123=one two three help me....

2 Answers  


Write a program to add a given duration with time(24hrs format)

1 Answers   Protech,


du u know test pattern for robosoft? Plz share

1 Answers   RoboSoft, TATA, Wipro,


Categories