C Programming - Library Functions - Discussion

Discussion Forum : Library Functions - Point Out Errors (Q.No. 1)
1.
Point out the error in the following program.
#include<stdio.h>

int main()
{
    fprintf("IndiaBIX");
    printf("%.ef", 2.0);
    return 0;
}
Error: unknown value in printf() statement.
Error: in fprintf() statement.
No error and prints "IndiaBIX"
No error and prints "2.0"
Answer: Option
Explanation:

Declaration Syntax:
int fprintf (FILE *stream, const char *format [, argument, ...]);

Example:
fprintf(filestream, "%s %d %s", Name, Age, City);

Discussion:
5 comments Page 1 of 1.

Sowmiya said:   9 years ago
"%. ef" Can anyone explain this with an example?

Jayashri Vyavahre said:   1 decade ago
What is the meaning of "%.ef" ?

Ravi said:   1 decade ago
Please explain this.

Payal said:   1 decade ago
"%.ef" define what?

Bhakar said:   1 decade ago
Value in e power.

Post your comments here:

Your comments will be displayed after verification.