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

What does c mean in standard form?

0 Answers  


How can you call a function, given its name as a string?

0 Answers  


Blade logic interview question. 1st round is a written tests with 15 multiple questions from c and c++. All are simple basic question. Like int main () { Int i=65; Return printf(ā€œ%cā€, i); } 2nd and 3rd round is technical interview. The position for which I was interview was core UNIX and c. Yes it is for system programming. The company has product name blade server. For their server they are creating their own command for their purpose. Example cd command. We can implement it in a c program by using the chdir() function. So the question asks related to PID, fork, pipe, shared memory, signal. Write a program in c which will act as cp command.

1 Answers   BladeLogic, Infosys,


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

0 Answers  


What is calloc() function?

0 Answers  






Is c programming hard?

0 Answers  


Do you know null pointer?

0 Answers  


What are pointers? Why are they used?

0 Answers  


pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)

2 Answers   Subex, Wipro,


Write a c program to sort six numbers and find the largest one by using the ladder of if-else? plz do help me

2 Answers  


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

0 Answers  


What are directives in c?

0 Answers  


Categories