Inserting an element in an array (C program)
Вставка
- Опубліковано 10 кві 2020
- Follow my Whatsapp channel for content updates, questions, contests and many more...
whatsapp.com/channel/0029VaEh...
Technical lectures by Shravan Kumar Manthri.
Watch " Patterns in C- Tips & Tricks " in the following link...
www.udemy.com/course/patterns...
You can watch "Tricky 150 mcqs in C" in the following link
www.udemy.com/course/best-150...
Technical lectures by Shravan Kumar Manthri.
Watch Technical C programming
• Technical C coding : p...
Watch Data Warehousing & Data Mining
• 1. Multi-Dimensional ...
Watch Design & Analysis of Algorithms
• 1. Introduction to the...
Watch Formal Languages & Automata theory
• 1. Introduction to Aut...
Visit us: www.csegurus.com
Contact me @ fb : shravan.kites@gmail.com
Like us on fb: CSE GURUS
This video Inserting an element in an array with execution. #ShravankumarManthri#CSEGURUS #ShravankumarManthri#CSEGURUS
This video is very helpful 😊😊
Sir y we should decrement here we need to increment right
Thanks a lot
Very nice explanation..... Thank you so much..... You solved my problem.... Thank you again ❤
Very glad to hear from u... Keep Learning..
You can watch this playlist for more stuff in C
ua-cam.com/play/PLYT7YDstBQmEGhVqAoubBS0OE_5m4JDUe.html
Sir if i want to do while loop then how can i do , i try lot but i dont understand how to do ?
instead of for use while thats all
use while until i reaches the particular positoin
Thnks so mch sir❤️
Most welcome..
You can watch this playlist for more stuff in C
ua-cam.com/play/PLYT7YDstBQmEGhVqAoubBS0OE_5m4JDUe.html
simple explanation👌❤ thank you
You're welcome 😊...Watch Top 90 Data Structures MCQs in the following link...
ua-cam.com/video/i2LTAJhkFf8/v-deo.html
great explanation sir ☺️☺️
THank you...You can watch this playlist for more stuff in C
ua-cam.com/play/PLYT7YDstBQmEGhVqAoubBS0OE_5m4JDUe.html
Very nice explanation sir ....
Thanks and welcome....You can watch this playlist for placement related stuff in C
ua-cam.com/play/PLYT7YDstBQmEGhVqAoubBS0OE_5m4JDUe.html
Thank you so much
Great explanation sir,God bless you
You are most welcome...
Watch Top 90 Data Structures MCQs in the following link...
ua-cam.com/video/i2LTAJhkFf8/v-deo.html
= in last for loop is giving garbage value i think it shouldn't be there?
Nicemethod of teaching sir
Thank you.. Keep Learning...
suggest any compiler for cprogramming language.
Codeblocks .
thank you so much.
You're welcome...You can watch this playlist for placement related stuff in C
ua-cam.com/play/PLYT7YDstBQmEGhVqAoubBS0OE_5m4JDUe.html
Nice explainàtion.sir
Thanks and welcome..You can watch this playlist for more stuff in C
ua-cam.com/play/PLYT7YDstBQmEGhVqAoubBS0OE_5m4JDUe.html
but last value is not printing becz length is not increased......how can we do that ??
Recall that you should loop till your index is less or equal to n in the final printing loop to display the last element.
Thank you ☺️💟
Most welcome…You can watch this playlist for placement related stuff in C
ua-cam.com/play/PLYT7YDstBQmEGhVqAoubBS0OE_5m4JDUe.html
Very helpful
Most Welcome..
Watch all sortings with clear explanation in the following link..
www.udemy.com/course/draft/3956622/?referralCode=306AAC6206D9B4584A1B
Wonderfully explained
Glad you liked it...You can watch this playlist for more stuff in C
ua-cam.com/play/PLYT7YDstBQmEGhVqAoubBS0OE_5m4JDUe.html
Thank u
Most Welcome..
Hit the below link for best techniques in patterns in C. ua-cam.com/video/hWhMAoBhi7M/v-deo.html
A little correction:
array[position] = value ;
You should do code for it pn your computer screen
You can watch this playlist for placement related stuff in C
ua-cam.com/play/PLYT7YDstBQmEGhVqAoubBS0OE_5m4JDUe.html
Why we cant insert like this temp=array[position]
array[position]=element
array[size]=temp..
Pls rply sir...
Its swap statement
The second last for loop is wrong!!!There you have to take i>=position-1.
yes
why we need to take (pos-1) if we want to put the value in the index 3 we can directly give for(int i=0;i>=pos;i--)
GDB can better answer your question, so debug your code by watching carefully the values taken by pos and i.
beacuse index = pos -1
Why we cant insert like this temp=array[position]
array[position]=element
array[size]=temp..
Pls rply
Sir what is i ???
Plz explain[ printf("enter%d elements /n" , n); ]
Why we use n at the end?????..
What it's role?
Plz sir reply me soon...
The format specifier %d will be replaced by the value of n.
Hindi ch bolia kro sir
500 likes
Code is wrong
No it's right
#include
int main()
{
int array[50], position, c, n, value;
printf("Enter number of elements in the array
");
scanf("%d", &n);
printf("Enter %d elements
", n);
for (c = 0; c < n; c++)
scanf("%d", &array[c]);
printf("Please enter the location where you want to insert an new element
");
scanf("%d", &position);
printf("Please enter the value
");
scanf("%d", &value);
for (c = n - 1; c >= position - 1; c--)
array[c+1] = array[c];
array[position-1] = value;
printf("Resultant array is
");
for (c = 0; c
So easy to understand thanks❤️