Question
This must be a C PROGRAMMING script using ARRAY. Thank you :)


3. Create a script that will take an array of numbers and show the numbers in reversed order. Size of Array and elements have to be prompted to the user. Another Array variable of the same type should keep the numbers in reversed order. a. b. EX) If A 11, 2, 3,4, 5) was chosen as input, the output 8 should be B-(5, 4, 3,2, 1
0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include<stdio.h>

main()

{

int size,x=1;

printf("Enter the size::");scanf("%d",&size);

int A[size],B[size],i;

for(i=1;i<=size;i++)

{

printf("Enter The data::");scanf("%d",&A[i]);

}

for(i=size;i>0;i--)

{

B[x]=A[i];

x++;

}

for(i=1;i<=size;i++)

{

printf("%d",B[i]);

}

}

Add a comment
Know the answer?
Add Answer to:
This must be a C PROGRAMMING script using ARRAY. Thank you :) 3. Create a script...
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 me to make this c programming code!! Thank you!! Concatenation of two strings using...

    Please help me to make this c programming code!! Thank you!! Concatenation of two strings using pointers Step 1: Ask the user to input ni,n2 and create two character arrays (strings) with ni, n2 size using malloc. Step 2: create a 3rd array using malloc of size(n1+n2). Step 3: Ask the user to input String1 (of size nl) Step 4: Ask the user to input String2 (of size n2) Step 5: concatenate the two arrays and store them in String3...

  • it must be in C programming language , Thanks in advance! [2D array] [50 pts] In...

    it must be in C programming language , Thanks in advance! [2D array] [50 pts] In this question, you will create a 2-D array with name arr that stores the first 36 non-negative numbers (0 to 35). You have to follow the following guidelines: • You cannot manually enter all 36 numbers by hand. If you do that you will get from this part. You have to use loop/loops to define that array. (15 pts] • You should be printing...

  • Please code in C thank you. 1. Create an array with 20 random numbers between 1...

    Please code in C thank you. 1. Create an array with 20 random numbers between 1 and 100. Incorporate the following specifications. • Send the base address of the array and an integer to a function called sort(). • The integer is a user input which is either 0 or 1. If the user does not enter either 0 or 1, keeping asking the user until you get the right input. • If the user input is 0, sort the...

  • ***************C PROGRAMMING ONLY************* Demonstrate the ability to create an array on the stack Demonstrate the ability...

    ***************C PROGRAMMING ONLY************* Demonstrate the ability to create an array on the stack Demonstrate the ability to create an array on the heap allowing user to choose the number of values to store. Demonstrate the ability to store an array of Struct values on both the stack and the heap. Program Specifications: 1. Create a struct with at least 3 fields - any struct you want but explain it in your comments in the code. Populate at least 10 elements...

  • Answer should be in C programming language Write a program that will create an array of...

    Answer should be in C programming language Write a program that will create an array of 10 floating point numbers and take input 10 floats from keyboard. The program will print the position (index) of the maximum and minimum number among them

  • I need help with this python programming exercise, please! thanks in advance Create a Python script...

    I need help with this python programming exercise, please! thanks in advance Create a Python script file called hw4.py. Add your name at the top as a comment, along with the class name and date. Both exercises should be in this file, with a comment before each of them to mark it. Ex. 1. Write a program that inputs an integer number from the user, then prints a letter "O" in ASCII art using a width of 5 and the...

  • Use C programming, Also please use “printf” function when displaying text In Probability, number of"combinations" (sometimes...

    Use C programming, Also please use “printf” function when displaying text In Probability, number of"combinations" (sometimes referred to as binomial coefficients) ofn times taken r at a time is written as C (n.r) = | | = . If an order conscious subset of r times taken from a set of n times- the permutations, it is written as P(n, r) = . Both cases, r n 1. n! r r(nr)! n! Create a script that will prompt the user...

  • Using C++ create a lotto program Lottery Design a program that simulates a lottery. Requirements:  The program...

    Using C++ create a lotto program Lottery Design a program that simulates a lottery. Requirements:  The program should have an array of 5 integers named lottery and should generate a random number in the range of 1 through 99 for each element of the array. The user should enter five digits, which should be stored in an integer array named user. The program is to compare the corresponding elements in the two arrays and keep a count of the digits that...

  • Create a program that takes in user input and stores the input into an array. Also...

    Create a program that takes in user input and stores the input into an array. Also within the program show how you can: show the elements in the array, remove an element from the array, add an element to the array. Do NOT ask the user how many elements they want to add, instead once they are done adding, they should hit ‘q’ and it should break out of the input. This is a c++ program. The input type shall...

  • JAVA PROGRAMMING PLEASE This lab has three parts: Create an ArrayList class. Create a LinkedList class....

    JAVA PROGRAMMING PLEASE This lab has three parts: Create an ArrayList class. Create a LinkedList class. Print out the results after testing each of the methods in both of the classes and solving a simple problem with them. Task 1 – ArrayList Class Create an ArrayList class. This is a class that uses an internal array, but manipulates the array so that the array can be dynamically changed. This class should contain a default and overloaded constructor, where the default...

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