Find out the error in following C program. 1. tinclude 2. 3. int main () 4. ( 5. int x = 3; 6. if (x = 4) 7. printf("x is equal to 4"); 8. else 9. 10. return 0; 11. } printf ("x is not equal to 4"); O A. 4 should be enclosed in quotations O B. There is no semicolon at the end of the first line oC. Equals to operator mistake O D. Variable x, should not be inside quotation.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Find out the error in following C program.
1. finclude <stdio.h>
2.
3. int main ()
4. {
5. int x = 3;
6. if (x = 4)
7.
printf("x is equal to 4");
8. else
9.
10. return 0;
11. }
printf ("x is not equal to 4");
O A. 4 should be enclosed in quotations
O B. There is no semicolon at the end of the first line
O C. Equals to operator mistake
O D. Variable x, should not be inside quotation.
Transcribed Image Text:Find out the error in following C program. 1. finclude <stdio.h> 2. 3. int main () 4. { 5. int x = 3; 6. if (x = 4) 7. printf("x is equal to 4"); 8. else 9. 10. return 0; 11. } printf ("x is not equal to 4"); O A. 4 should be enclosed in quotations O B. There is no semicolon at the end of the first line O C. Equals to operator mistake O D. Variable x, should not be inside quotation.
Based on the following FLOWCHART and tracing table,
START
N
SUM
N=0
SUM=0
A
A
B
B
IF
NO
N=N*5
N<5
SUM=SUM+N
D
D
I YES
N=N+2
SUM=SU M+N
PRINT
SUM, N
OUTPUT:
END
1) What is the value of N and SUM for part A ?:
O 1,1
O 2, 3
O 1,2
O 2, 2
2) What is the value of N and SUM for part B
?:
O 4,4
O 4, 6
O 2, 6
O 2, 4
3) What is the value of N and SUM for part C ?:
O 6, 12
O 5, 6
O 6, 8
O 6, 10
4) What is the value of N and SUM for part D ?:
O 15 22
O 25, 42
O 25, 32
O 30, 42
5) What is the OUTPUT for part E?:
O 22, 15
O 42, 25
O 32, 25
O 42, 30
Transcribed Image Text:Based on the following FLOWCHART and tracing table, START N SUM N=0 SUM=0 A A B B IF NO N=N*5 N<5 SUM=SUM+N D D I YES N=N+2 SUM=SU M+N PRINT SUM, N OUTPUT: END 1) What is the value of N and SUM for part A ?: O 1,1 O 2, 3 O 1,2 O 2, 2 2) What is the value of N and SUM for part B ?: O 4,4 O 4, 6 O 2, 6 O 2, 4 3) What is the value of N and SUM for part C ?: O 6, 12 O 5, 6 O 6, 8 O 6, 10 4) What is the value of N and SUM for part D ?: O 15 22 O 25, 42 O 25, 32 O 30, 42 5) What is the OUTPUT for part E?: O 22, 15 O 42, 25 O 32, 25 O 42, 30
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Structure chart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education