Questions related to c programming

Assignment Help C/C++ Programming
Reference no: EM13725955

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

Reference no: EM13725955

Questions Cloud

Health services strategic marketing : Health Services Strategic Marketing: Suggest at least two (2) examples that support the notion of the limiting life span of health care products as a necessity in the ongoing and systematic product succession planning effort
Describe the use of stock options in a compensation plan : Briefly describe the use of stock options in a compensation plan. What are some potential problems with stock options as a form of compensation
How does google support for open access fit into google plan : Case Analysis 4 - Google: Research Google's attempt to buy into wireless via the 700 MHz Spectrum Auction. How does Google's support for Open Access fit into Google's plans
Explain the pilgrims and native americans in massachusetts : Write a 700- to 1,050-word paper in which you examine one of the following topics- Pilgrims and Native Americans in Massachusetts, The kidnapping of colonists by Native Americans and Pequot War.
Questions related to c programming : 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);
Marketing plan- integrated marketing communications : Marketing Plan: Integrated Marketing Communications (IMC) Guidelines and Rubric, This is the culmination of the Marketing Plan. Detail the advertising and promotional activities that will be used to promote the product or service
What are the key success factors for competing : What are the key success factors for competing in the supermarket industry in Sonoma County. What is your assessment of Oliver's financial performance and financial condition. Is the company in good financial shape? Why or why not
What are major sources of the federal government revenue : What are the major functions of the government? Briefly discuss and what are the advantages and disadvantages of forming a corporation - what are the major sources of the federal government revenue?
Explain the democratic republicanism of the north differed : In the decades leading up the Civil War the North and South developed into two very different cultures. Explain how the democratic republicanism of the North differed from the aristocratic republicanism of the South.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program that skip s leading whitespace character

a) Write a program that skip s leading whitespace character s in each line of the pro vided data file CPPHumor .txt . Save the results in a new file

  Computes the product of all elements in a vector

Write a C function that computes the product of all elements in a vector x of dimension n. The elements of the vector are stored in a double array of size n.

  What output would be produced by the program segment

What output would be produced by the following program segment?

  Write a program to display the total salary for assistant

Write a program to display the total salary for assistant professors, associate professors, full professors, and all faculties, respectively, and show the average salary for assistant professors, associate professors, full professors, and all facu..

  Create a job class that holds a job id

Create a Job class that holds a Job ID number and the cost of the Job. Include insertion and extraction operators. Create a JobException class that holds a Job and an error message

  Determine the reynolds number of flow in a rectangular

determine the reynolds number of flow in a rectangular channel 2m deep and 4m wide if the water level is 60 and running

  Calculate the gpa of 5 courses

Write a C++ program to calculate the Gpa of 5 courses. When users enter the grades and credits of the courses from the keyboard, the program will calculates the GPA and displays it on the screen. Can you prepare this program in C++ language? Defin..

  Write a c program that will calculate the gross pay of a

write a c program that will calculate the gross pay of a set of employees.for each employee the program should prompt

  Write a program that reads ten numbers

Write a program that reads ten numbers from input and prints them in reverse order.

  How would you put a empty space between output

How would you put a empty space between output, right now it prints 6 rows but how do i add a space or a "\n" for example row1 row2 row3

  Write a short c++ function

Write a short C++ function, isMultiple, that takes two positive long values, n and m, and returns true if and only if n is a multiple of m, that is, n = mi for some integer i.

  Write a computer program to prepare a linear support vector

write a computer program to prepare a linear support vector machine svm. prepare a report and deliver the report

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd