Click here to Skip to main content
15,889,877 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
with the C programming language An array with 20 elements and a value less than ten will be entered. ‌
Do this by using a pointer that adds the value it takes from the end of the array elements to the beginning and shifts the other elements as much as the entered value.

What I have tried:

with the C programming language An array with 20 elements and a value less than ten will be entered. ‌
Do this by using a pointer that adds the value it takes from the end of the array elements to the beginning and shifts the other elements as much as the entered value.
Posted
Updated 10-Mar-22 4:07am
Comments
Greg Utas 10-Mar-22 9:22am    
I can't even understand what the code is supposed to do. Regardless, you will probably have to show some actual code that you've written to try and solve the problem. It is unlikely that anyone here will write the code for you.
kanarya 1907 10-Mar-22 9:38am    
By assigning a value to a 20-element array using c language programming, the elements of the array will be shifted as much as the number entered with a value less than 20, which will be received from the user. This will be done using pointers.
Greg Utas 10-Mar-22 9:42am    
I think that explains it, but you will probably have to show some code if you expect to get help.
Patrice T 10-Mar-22 10:03am    
Avoid telegraphic style.
Think: Subject, verb ...
Richard MacCutchan 10-Mar-22 10:31am    
Start by creating the array and populating it with the values. Then think how you will address the elements of the array using a single pointer. Once you understand that you can think how to move elements using two pointers.

1 solution

While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900