Concept explainers
Type in and run the six programs presented in this chapter. Compare the output produced by each
“printf” function:
The “printf” function is used to print the integer, float, character, string, hexadecimal and octal values onto the output screen.
Explanation of Solution
Program:
Consider the six programs presented in the given chapter.
Program 2.1:
//include the header file
#include <stdio.h>
//definition of main method
int main (void)
{
//display the statement
printf ("Programing is fun. \n");
//return statement
return 0;
}
Explanation:
The above program will simply display the statement using single “printf” function on the output screen.
Sample Output for program 2.1:
Programing is fun.
Want to see more full solutions like this?
Chapter 2 Solutions
Programming in C
Additional Engineering Textbook Solutions
Degarmo's Materials And Processes In Manufacturing
Concepts Of Programming Languages
Starting Out with Programming Logic and Design (5th Edition) (What's New in Computer Science)
Starting Out With Visual Basic (8th Edition)
SURVEY OF OPERATING SYSTEMS
Introduction To Programming Using Visual Basic (11th Edition)
- open file in python write in it list of months of the year and list of sales for each month then calculate the total and average and the min and max numberarrow_forwardopen file in python write in it list of months of the year from jan to dec and list of sales for each month then calculate the total and average and the min and max numberarrow_forwardSample input file: (Assume all names and IDs in the list are unique and must stay unique.) Introduction to Computer Programming Fundamentals CSCI 1 MBA 315 John Adams 111223333 100 87 93 90 90 89 91 Willy Smith Jr. 222114444 90 73 67 77 70 80 90 Phil Jordan 777886666 100 80 70 50 -60 90 100 Sample output file format: (Final report) Course Name: Introduction to Computer Programming Fundamentals Course ID: CSCI 1 Class Location: MBA 315 Name ID Average Grade Adams, John 111-22-3333 91.5 A Smith Jr., Willy 222-11-4444 87.0 B Jordan, Phil 777-88-6666 -1 I Student list print format to the monitor: Name Average Grade Adams, John 91.5 A Smith Jr., Will 87.0 B Jordan, Phil -1 I Student's detail format to the monitor: Name: Adams, John ID: 111223333 Quiz Score: 100.00 Test Scores: 87.00 93.00 90.00 90.00 89.00 91.00 Average: 91.54 Letter Grade: A Error messagesBad file name: Failed to open file.File with no data: Empty file.Adding student Error Adams is on the list, duplicated names are not…arrow_forward
- 1)Create a function that takes Celsius temperature and returns a Fahrenheit. Study CURSOR with parameters chapter, and Cursor For Loop. Use a cursor FOR loop inside your procedure.arrow_forwardWhich sentence is correct about the local variables? A) Each local variable only can be accessed inside its function. B Each local variable only can be accessed inside its loop. (C) all of these choices (D Each local variable only can be accessed inside all functions.arrow_forwardQ 2) Develop a decision table for the “second try" at the NextDate function. At the end of a 31-day month, the day is always reset to 1. For all non-December months, the month is incremented; and for December, the month is reset to January, and the year is incremented.arrow_forward
- Please use python to calculate student's letter grades(A, A+, B, B+, C, C+) based on quizzes, homework, midterm, and final obtain marks. Please use more than 5 functions including loop, list, if, for, function. (Please include Psedocode and flow chart). Thank You!arrow_forward(Heat transfer) The formula developed in Exercise 5 can be used to determine the cooling time, t, caused only by radiation, of each planet in the solar system. For convenience, this formula is repeated here (see Exercise 5 for a definition of each symbol): t=Nk2eAT3fin A=surfaceareaofasphere=4r2 N=numberofatoms=volumeofthespherevolumeofanatom Volume of a sphere sphere=43radius3 The volume of a single atom is approximately 11029m3 . Using this information and the current temperatures and radii listed in the following chart, determine the time it took each planet to cool to its current temperature, caused only by radiation.arrow_forwardMovies(mid,mname,releasedate,rating) Stars(sid,sname,gender,birthday) Casting(sid,mid) TCR and DCR Find the casting of “isle of dogs” (i.e. find all stars’ names who cast in “isle of dogs”)arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning