Which statement will read a floating point value from the


Question 1: Which statement will read a floating point value from the keyboard and store it in the variable x?

A. printf("float = %f", x);

B. scanf("%f", &x);

C. scanf("&f", %x);

D. scanf("%d", &x);

Question 2:Structures can at most be nest 3 deep?

True

False

Question 3: What is the equivalent C expression for the area of a circle (PI times radius squared)?

A. 3.14 x r x r

B. 3.14 * r^2

C. 3.14r^2

D. 3.14 * r * r

Question 4: Which statement will print the following variables correctly?int x; float y;

A. printf("x = %d y = %lf", x , y);

B. printf("x = %f y = %f", x , y);

C. printf("x = %d y = %d", x, y);

D. printf("x = %d y = %f", x , y);

Question 5: A procedure consisting of a number of precisely defined steps for solving a problem is called a(n):

A. program

B. algorithm

C. compiler

D. pseudo-code

Question 6: What will be the value of the floating point variable var1 after the following scanf statement if the user enters 123.45456.78 at the keyboard?

scanf("%5f%7f", &var1, &var2);

A. 123.45

B. 12345

C. 45456

D. 123.4

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Which statement will read a floating point value from the
Reference No:- TGS0979184

Expected delivery within 24 Hours