Computer Science: A Structured Programming Approach Using C, Third Edition
Computer Science: A Structured Programming Approach Using C, Third Edition
3rd Edition
ISBN: 9780534491321
Author: Behrouz A. Forouzan, Richard F. Gilberg
Publisher: Course Technology, Inc.
Expert Solution & Answer
Book Icon
Chapter 2, Problem 29PS

Explanation of Solution

Given: The following program:

int main(void)

{

//local Declarations

a int;

b : c : d char;

d, e, f double float;

//statements

printf("The end of the program. ");

return 0;

}//main

To find: The errors in the aforementioned program.

Solution:

In the aforementioned program, there are declaration errors due to which the program will show errors by displaying messages that the identifiers, such as a, b, c, d, e, f are undefined...

Blurred answer
Students have asked these similar questions
Find any errors in the following program. /* This is another program with some errors in it to be corrected. int main (void) { // Local Declarations a int; b float, double; c, d char; // Statements printf("The end of the program."); return 0; } // main
Find any errors in the following program. include <stdio.h> int main (void) { printf('hi how r u'); printf('c language '); return 0; }//ain
Find any errors in the following program./* This is the last program to be corrected in these exercises. int main (void) // Local Declarations a int; b :c :d char; d, e, f double float; // Statementsprintf("The end of the program."); return 0; } // main

Chapter 2 Solutions

Computer Science: A Structured Programming Approach Using C, Third Edition

Ch. 2 - To print data left justified, you would use a in...Ch. 2 - Prob. 12PSCh. 2 - One of the most common errors for new programmers...Ch. 2 - Which of the following is not a character constant...Ch. 2 - Which of the following is not an integer constant...Ch. 2 - Which of the following is not a floating-point...Ch. 2 - Prob. 17PSCh. 2 - Which of the following is not a valid identifier...Ch. 2 - What is the type of each of the following...Ch. 2 - What is the type of each of the following...Ch. 2 - Which of the following identifiers are valid and...Ch. 2 - Which of the following identifiers are valid and...Ch. 2 - What is output from the following program...Ch. 2 - Prob. 24PSCh. 2 - Find any errors in the following program....Ch. 2 - Find any errors in the following program....Ch. 2 - Prob. 27PSCh. 2 - Prob. 28PSCh. 2 - Prob. 29PSCh. 2 - Code the variable declarations for each of the...Ch. 2 - Code the variable declarations for each of the...Ch. 2 - Write a statement to print the following line....Ch. 2 - Write a program that uses four print statements to...Ch. 2 - Write a program that uses four print statements to...Ch. 2 - Write a program that uses defined constants for...Ch. 2 - Prob. 36PSCh. 2 - Prob. 37PSCh. 2 - Write a program that prompts the user to enter an...Ch. 2 - Write a C program using printf statements to print...Ch. 2 - Write a program that reads a character, an...Ch. 2 - Write a program that prompts the user to enter...Ch. 2 - Write a program that reads 10 integers and prints...Ch. 2 - Write a program that reads nine integers and...
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage