What part of the program has a BUG?

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter6: User-defined Functions
Section: Chapter Questions
Problem 7SA: Consider the following statements: Which of the following statements are valid? If they are...
icon
Related questions
Question

What part of the program has a BUG?


#include<conio.h>
#include<stdio.h>
main()
{
(1) int no1,no2;                            
printf(“Input 1st Number: ”);
scanf(“%i”,&no1);
printf(“\nInput 2nd Number: ”);
(2) scanf(“%f”,&no2);
(3) printf(“\nThe First number is %i and the Second number is %i”,no1,no2);
getch();
        return 0;
        }

What part of the program has a BUG?
#include<conio.h>
#include<stdio.h>
main()
{
(1) int no1,no2;
printf("Input 1st Number: ");
scanf("%i",&no1);
printf("\ninput 2nd Number: ");
(2) scanf("%f",&no2);
(3) printf("\nThe First number is %i and the Second number is %i",no1,no2);
getch();
retum 0;
}
Select one:
a. line 1
b. no error
c. line 3
d. line 2
Transcribed Image Text:What part of the program has a BUG? #include<conio.h> #include<stdio.h> main() { (1) int no1,no2; printf("Input 1st Number: "); scanf("%i",&no1); printf("\ninput 2nd Number: "); (2) scanf("%f",&no2); (3) printf("\nThe First number is %i and the Second number is %i",no1,no2); getch(); retum 0; } Select one: a. line 1 b. no error c. line 3 d. line 2
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Avoiding deadlock
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning