Question

(9) Identify the errors in the following program. int al10], *pa, i10; pa a

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
(9) Identify the errors in the following program. int al10], *pa, i10; pa a
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Question 8 Identify the COMPILER ERRORS and EXCEPTIONS in this program. This program is saved in...

    Question 8 Identify the COMPILER ERRORS and EXCEPTIONS in this program. This program is saved in a file named MyProgram.java. public class MYProgram { public static void main( String [] args ) { int [] arrayOfIntegers = { 15, 20, 30 50, 60 }; for( int i = 0; i <= arrayOfIntegers.length(); i++ ) { System.out.println( "Hello" + i * 2 ) int i = 100 * arrayOfIntegers[ i ]; doSomething( i ); } } Public static void DoSomething( )...

  • Find two syntax errors in the following program: #include <iostream> using namespace std; int area(int length,...

    Find two syntax errors in the following program: #include <iostream> using namespace std; int area(int length, int width = 0); int main() { int length, width; // for rectangle use both arguments cout << "Enter length and width of a rectangle" << endl; cin >> length >> width; cout << "The area is " << area(length, width) << endl; // for square, only need first argument cout << "Enter side of a square" << endl; cin >> length; cout <<...

  • 9. Which of the following is true for the following program? #include <stdio.h> int maino int...

    9. Which of the following is true for the following program? #include <stdio.h> int maino int i = 1; switch (0) case 1: printf("%d", 0); case 2: printf("%d", 0); case 3: printf("%d", 0); default: printf("%d", 1); return 0; } (2 points) The program has no error, the output is 1111 The program has no error, the output is 1 The program produces a compile time error, because there are no break statements The program produces a compile time error, because...

  • 4. Each of the following definitions and program s egments has errors. Rewrite them without errors....

    4. Each of the following definitions and program s egments has errors. Rewrite them without errors. a. int x, *ptr; = ptr; b. int x, *ptr; c. int x, *ptr; ptr 100; // Store 100 in x cout << x << endl; d. int numbers10, 20, 30, 40, 50); cout << "The third element in the array is"; cout << *numbers 3<< endl; e. int values [20], *iptr; iptr - values; ptr *= 2;

  • The following program has some syntax errors. Enumerate the errors then rewrite, compile and run the...

    The following program has some syntax errors. Enumerate the errors then rewrite, compile and run the program after correction. #include <stdio.h> int Main( ); { float w ; float wk ; printf ("Enter your weight in pounds "); scanf["%d" weight];    wk=w x 0.45359237 ; printf('Your weight in kilograms is %d',wk); }

  • The program has errors. Identify and make the necessary changes to make the program work. Remember...

    The program has errors. Identify and make the necessary changes to make the program work. Remember to follow the rules of functions and arrays. Here is the expected output Total = 20 Average = 15 Area = 150 Area = 70 Enter a value: 10 Value 1 entered = 10 Enter an integer: 20 Value 2 entered = 20 Enter an integer: 30 Value 3 entered = 30 .................................................................. #include <iostream> using namespace std; void total(int, int, int); double average(int...

  • DEBUGGING. JAVA. Identify the errors in the following. There are no logical errors in this one...

    DEBUGGING. JAVA. Identify the errors in the following. There are no logical errors in this one just syntax issues. //start import java.util.Scanner; public class NumbersDemo {    public static void main (String args[])    {       Scanner kb = new Scanner(System.in);       int num1, num2;             System.out.print("Enter an integer >> ");       num1 = kb.nextInt();       System.out.print("Enter another integer >> ");       num2 = kb.nextDouble();       displayTwiceTheNumber(num1);       displayNumberPlusFive(num1);       displayNumberSquared(num1)       displayTwiceTheNumber(num2);       displayNumberPlusFive(num2);       displayNumberSquared(num2);    }   ...

  • Translate the following C program to Pep/9 assembly language. #include <stdio.h> int main() {     int...

    Translate the following C program to Pep/9 assembly language. #include <stdio.h> int main() {     int number;     scanf("%d", &number);     if (number % 2 == 0) {         printf("Even\n");     }     else {         printf("Odd\n");     }     return 0; }

  • 1- Correct the syntax errors in the following program, and rewrite the program so that it...

    1- Correct the syntax errors in the following program, and rewrite the program so that it follows the proper style conventions. What does the program do? (Write it out as a comment). (10 pts) #include <stdio.h> int main() {/* * Calculate and display the difference of two values *) int X, /* first input value */ x, /* second input value */ sum; /* sum of inputs */ X=9, x=7.5 X + x = sum; printf("%d + %d = %d\n";...

  • What is the output of the program segment? Assume there are no syntax errors and the...

    What is the output of the program segment? Assume there are no syntax errors and the code will compile. int i = 1; int n = 0; do { cout << i; i++; } while (i <= n); b) What are the values of i and n after execution? Assume there are no syntax errors and the code will compile. int i = 1; int n = 0; do { cout << i; i++; } while (i <= n);

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT