Question: Q1. Write a single C statement to accomplish each of the following: (6*4= 24 points) 1. State that a program will print an integer, a

 Q1. Write a single C statement to accomplish each of thefollowing: (6*4= 24 points) 1. State that a program will print an

Q1. Write a single C statement to accomplish each of the following: (6*4= 24 points) 1. State that a program will print an integer, a float, and a character. 2. Declare an integer variable age, a character initial, and a float grade. 3. Ask the user to enter an integer, a float number, and a character. End your promoting message with a colon O. 4. Read an integer, a float number, and a character from the keyboard and store the values into age, initial and grade, respectively. 5. Print the integer variable age, a character initial, and a float grade each on a separate line. 6. Print the message "This is the end of the program" with each word separated by tabs. Q2. Identify and correct the errors in each of the following statements: (4*6= 24 points) 1. printf( "The sum is %d "); 2. printf( "The sum is %d , sum" ); 3. scanf("%c, &letter"); 4. scanf( %c, letter); Q3. What is the output of the following program? (22 points) #include int main() { double first=5.52, second=3.26, temp; printf("The first number is: %d", first); printf("The second number is: %d", second); temp = first; first = second; second = temp; printf(" After swapping, the first number = %.21f ", first); printf("After swapping, the second number = %.20f", second); return 0; } Q4. Write a C program that prints the following pattern. (30 points) ** *** ***** ******* *********

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!