C Programming - Input / Output - Discussion
Discussion Forum : Input / Output - True / False Questions (Q.No. 1)
1.
While calling the fprintf() function in the format string conversion specifier %s can be used to write a character string in capital letters.
Answer: Option
Explanation:
The %s format specifier tells the compiler the given input was string of characters.
Discussion:
3 comments Page 1 of 1.
Vivek said:
10 years ago
How fprintf will convert the string into capital? Even in explanation they mentioned some different characteristic.
Muktha said:
2 years ago
fprintf for displaying input to a stream(pointer to a file).
sprintf(input gets stored in a string buffer).
printf(formatted input to std output) but here the format specifier should be %S instead of %s.
sprintf(input gets stored in a string buffer).
printf(formatted input to std output) but here the format specifier should be %S instead of %s.
Muktha said:
2 years ago
I think this because %s is for indicating given input is a string of characters, but for character strings in capital letters, %S should be used.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers