State if each of the following is a legal C identifier: What is the output of th
ID: 3664649 • Letter: S
Question
State if each of the following is a legal C identifier: What is the output of the following? If the program outputs any spaces, clarify how many. Write calls to printf to display the float x in the following format: Exponential notation, left justified, in field size of 7 with 2 digits after the decimal point Decimal notation, with +/- sign always written, right justified, in field size of 10, with 3 digits after the decimal point, and 0 used for any padding necessary Assume that a and b are int variables and x is a float variable. What is the value of each variable after the following scanf is called: Write a statement to read the time from standard input in the form of hh:mm:ss and store it in three integer variables denoting the hours, minutes and seconds.Explanation / Answer
Question 1)
Main- legal
2016Average- illegal(all identifiers must start with a letter or underscore)
$alpha- illegal( identifiers must only consist of letters digits and underscore nothing else)
_username- legal(starting with _ is legal but not preferred)
Question 2)
a)
Output is: +35
2 spaces between : and + in answer if there is no space between : and % in question
3 spaces between : and + in answer if there is 1 space between : and % in question
b)
1.2510E+01
Question 3)
a)printf("%7.2E",7245.5566);
b)printf("%+10.3f",-35.22);
Question 4)
5 7.0 10
Question 5)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.