Question

Incorrect Question 12 0/4 pts What of the following are true for the following piece of code? int main() int a[ ] = { 2, 4, 6

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer:

this line void change(int *b, int n) has an error. We must have to use int b[] as we are passing an array. The change functio

Add a comment
Know the answer?
Add Answer to:
Incorrect Question 12 0/4 pts What of the following are true for the following piece of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please help in C: with the following code, i am getting a random 127 printed in...

    Please help in C: with the following code, i am getting a random 127 printed in front of my reverse display of the array. The file i am pulling (data.txt) is: 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 when the reverse prints, it prints: 127 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 not sure why...please...

  • QUESTION 3 Assume x = 4 and y = 5, which of the following is true?...

    QUESTION 3 Assume x = 4 and y = 5, which of the following is true? x < 5 || y < 5 x > 5 || y > 5 x < 5 && y < 5 x > 5 && y > 5 QUESTION 14 Which of the following statements are the same? (A) x -= x + 4 (B) x = x + 4 - x (C) x = x - (x + 4) (A) and (B) are...

  • Hello, I have my piece of C programming code and I have a pointer initialized to...

    Hello, I have my piece of C programming code and I have a pointer initialized to point to my array and I need help to display the contents of my array using a while loop or do-while loop. The stop condition should be when the pointer reaches '\0'. The code is below: #include <stdio.h> int main () {    char array[80]; printf("Enter a string: "); scanf("%[^\n]", &array); printf("%s\n", array); char * p;    p = array;         }

  • C Programming write two functions, similar to what you see in the sample program. The first will ask the user to enter some information (I have included the type in parentheses) First Name (char[]) L...

    C Programming write two functions, similar to what you see in the sample program. The first will ask the user to enter some information (I have included the type in parentheses) First Name (char[]) Last Name (char[]) Age (int) Height in Inches (double) Weight in Pounds (double) You will use pass-by-reference to modify the values of the arguments passed in from the main(). Remember that arrays require no special notation, as they are passed by reference automatically, but the other...

  • A)Correct this code and explain what was corrected // C code - For Loop / Array...

    A)Correct this code and explain what was corrected // C code - For Loop / Array Population // This program will populate integers into an array, and then display those integers. // Developer: Johnson, William CMIS102 // Date: Mar 4, 2020 // Global constants #define INTLIMIT 10 #include <stdio.h> // This function will handle printing my name, class/section number, and the date void printStudentData() { char fullName[19] = "William J. Johnson"; char classNumber[9] = "CMIS 102"; char sectionNumber[5] = "4020";...

  • using C++ l Grant P. Microsoft PowerPoi.. Mail - elijah joshlin.. Tokyo Ghoul 3 (Sub.. How...

    using C++ l Grant P. Microsoft PowerPoi.. Mail - elijah joshlin.. Tokyo Ghoul 3 (Sub.. How to Watch The... OS EJ Purpose The purpose of this lab is to learn how to use pointers within an application. Process Use the following main function: include <stdio.h> void main int i; int j: int p i 10 5 20: Add printf statements to display the values assigned to each variable and their addresses. Your output should appear similar to the following: i:...

  • 3) (10 pts) For the purposes of this question, a permutation of size n is any...

    3) (10 pts) For the purposes of this question, a permutation of size n is any ordering of the integers 0, 1, 2, ..., n-1. We define a spaced-out permutation of size n to be a permutation such that two consecutive terms in the permutation differ by at least 2. For example, [0, 2, 4, 1, 3] is a spaced out permutation of size 5, and [5, 2, 4, 0, 3, 1] is a spaced out permutation of size 6,...

  • int short real float Question 11 The square brackets [] are commonly used in C for......

    int short real float Question 11 The square brackets [] are commonly used in C for... attaching multiple lines of code declaring and accessing arrays commenting code setting precedence in arithmetic calculations Question 12 + → XCO D Question 13 4 pts #include<stdio.h> void change(int "b, int n): int maino inti, al = 12.4,6,8, 10): changea, 5): for(i=0; i< =4; i++) printf("%d.". a[i]): return 0; void change(int *b, int n) int i; for(i=0; i<n; i++) "b+1) = "(+1)+5: 246810 2.15,...

  • How can I integrate these programs into this menu template: #define _CRT_SECURE_NO_WARNINGS #include #include #include #include...

    How can I integrate these programs into this menu template: #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include void program_one (); void program_two (); void program_three (); void program_four(); void program_five(); int main() { int menu_option = 0; while (menu_option != 9) { printf(" = 1\n"); //Change this to your first program name. Nothing else. printf(" = 2\n"); //Change this to your second program name. Nothing else. printf(" = 3\n"); //Change this to your third program name. Nothing else. printf(" =...

  • create case 4 do Method 1:copy item by item and skip the item you want to...

    create case 4 do Method 1:copy item by item and skip the item you want to delete after you are done, delete the old file and rename the new one to the old name. #include int main(void) { int counter; int choice; FILE *fp; char item[100]; while(1) { printf("Welcome to my shopping list\n\n"); printf("Main Menu:\n"); printf("1. Add to list\n"); printf("2. Print List\n"); printf("3. Delete List\n"); printf("4. Remove an item from the List\n"); printf("5. Exit\n\n"); scanf("%i", &choice); switch(choice) { case 1:...

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