Open In App
Related Articles

ISRO | ISRO CS 2008 | Question 78

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report
In C, what is the effect of a negative number in a field width specifier? (A) the values are displayed right justified (B) the values are displayed centered (C) the values are displayed left justified (D) the values are displayed as negative numbers

Answer: (C)

Explanation: To left justify, use a negative number in the field width:
printf("NYU has %-10d students", numStudents);
// Output: // NYU has 35123 students So, option (C) is correct.

Quiz of this Question

Last Updated : 13 Jun, 2018
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads