Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. (20 points) What types of error is each of the following? *Forgot to add a ; when declaring a variable *When computing the area

1. (20 points) What types of error is each of the following? *Forgot to add a ; when declaring a variable *When computing the area of a circle, you used the formula: area = 2 * PI * radius.

2. (25 points) What happens when the statement below executes and the values -3, A, and 4.5 are entered?

int x; char y; double z; scanf("%d%c%f", &x, &y, &z);

3. (30 points) What is the output of the following code segment when the user enters the values: -13, C, and 12.45678 in order.

#include int x; char y; double z; printf("Enter an integer, a character, and a number with digits after

decimal point: "); scanf ("%d%c%f", &x, &y, &z); x = x + 3; y = y - 1; z = x * z; printf(" x = %6d", x); printf(" y = %5c", y); printf( z = %8.3f", z); printf( Stop.);

3. (25points be precise and use correct terminology) a. (a one word answer will do for this question) What kind of a C language statement is

int x;

b. What is the effect of this statement? (What does the compiler do with this statement?)

c. What would happen during the compilation of your program if this statement were omitted from this code and the compiler later encountered the statement x = x + 3; ?

image text in transcribed

Instructions: Place your answers under each question. Write neatly and use correct English. Use the terminology you have been reading about. 1. (20 points) What types of error is each of the following? Forgot to add a; when declaring a variable *When computing the area of a circle, you used the formula: area = 2 * PI * radius. 2. (25 points) What happens when the statement below executes and the values -3, A, and 4.5 are entered? int x; char y double ; scanf("%d%c%f", &x, &y, &z); 3 (30 points) what is the output of the following code segment when the user enters the values:-13, C, and 12.45678 in order include int x; char y: double z; printf("Enter an integer, a character, and a number with digits after decimal point: ") scanf ("%d%c%f", &x, &y, &z); xx+ 3; y-y-1; 2x2; printf(" x- %6d", x); printf (" y- %5c", y); printf(" z %8.3f", z); printf( In Stop.") 3. (25points be precise and use correct terminology) a. (a one word answer will do for this question) What kind of a C language statement is int x b. What is the effect of this statement? (What does the compiler do with this statement?) c. What would happen during the compilation of your program if this statement were omitted from this code and the compiler later encountered the statement x = x + 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven NoSQL Databases In A Week Get Up And Running With The Fundamentals And Functionalities Of Seven Of The Most Popular NoSQL Databases

Authors: Aaron Ploetz ,Devram Kandhare ,Sudarshan Kadambi ,Xun Wu

1st Edition

1787288862, 978-1787288867

More Books

Students also viewed these Databases questions

Question

5. What information would the team members need?

Answered: 1 week ago