C Programming - Input / Output - Discussion

Discussion Forum : Input / Output - Find Output of Program (Q.No. 3)
3.
What will be the output of the program ?
#include<stdio.h>
char *str = "char *str = %c%s%c; main(){ printf(str, 34, str, 34);}";

int main()
{
    printf(str, 34, str, 34);
    return 0;
}
char *str = "char *str = %c%s%c; main(){ printf(str, 34, str, 34);}"; main(){ printf(str, 34, str, 34);}
char *str = %c%s%c; main(){ printf(str, 34, str, 34);}
No output
Error in program
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
28 comments Page 2 of 3.

Siva sangeetha said:   1 decade ago
How could understand in easiest way?

"=asci value of 34.

Then str is? How and what will be correct?

Snehal said:   1 decade ago
#include<stdio.h>
void main()
{
char ch=291;
printf("%d %d %d",32770,ch,ch);
}

Lakshmeesh said:   1 decade ago
Still I am facing problem in input and output statements.

Amrit said:   8 years ago
I'm not getting this.

Please give a proper explanation.

Siva said:   1 decade ago
What is mean by char*string;? Could you explain please?

Gshankar said:   1 decade ago
I can't understand could anyone explain this properly.

Vijji said:   1 decade ago
I want detailed explanation. Please explain this bit.

Saurabh said:   7 years ago
Very helpful. Thanks for the answer @Vishnupriya.

Pooja said:   7 years ago
Good explanation thanks @Vinshnupriya.

Pavitra said:   1 decade ago
I can't undeastand please explain it.


Post your comments here:

Your comments will be displayed after verification.