print out of string in this format;
1. "rajesh"
2. \n
3. %d

Answer Posted / sanjay bhosale

No need of extra variable :
You can simply write...
printf("\n1.\t\"Rajesh\"");
printf("\n2.\t\\n");
printf("\n3.\t%%d");

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is the benefit of using enum to declare a constant?

591


What is pointer to pointer in c?

636


In the DOS enveronment, normal RAM that resides beyond the 1mb mark. a) expanded memory b) swapped memory c) Extended memory d) none

726


Explain how can I remove the trailing spaces from a string?

628


What is array of structure in c programming?

758






What is the maximum no. of arguments that can be given in a command line in C.?

674


Why is %d used in c?

569


find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }

1863


What is the use of a static variable in c?

596


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

648


Explain spaghetti programming?

684


What does & mean in scanf?

606


What is the condition that is applied with ?: Operator?

667


What is the difference between far and near in c?

604


How can you increase the size of a statically allocated array?

622