C Programming - Library Functions - Discussion
Discussion Forum : Library Functions - Point Out Errors (Q.No. 3)
3.
Point out the error in the following program.
#include<stdio.h>
int main()
{
char str[] = "IndiaBIX";
printf("%.#s %2s", str, str);
return 0;
}
Discussion:
17 comments Page 2 of 2.
Jone said:
4 years ago
Why we used the #symbol in printf statement? Please explain to me.
Neeraj kumar said:
1 decade ago
How it will print like this "%.#s %2s"?
XYZ said:
1 decade ago
Why it is printing IndiaBIX in place of %2s?
Mahi said:
8 years ago
Thank you all for explaining it
Smita said:
7 years ago
It will print %.0#s IndiaBIX.
Karthik said:
1 decade ago
Why dont print the %.#s ?
Sms said:
1 decade ago
It prints %.#s IndiaBIX
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers