tag:blogger.com,1999:blog-959939550345671470.post6104728614135632368..comments2024-03-24T12:51:18.535+05:30Comments on C programming Interview questions and answers: Write a c program for swapping of two arraysPriyanka kumarihttp://www.blogger.com/profile/08145649011863585828noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-959939550345671470.post-6782650012119330212017-11-21T12:40:04.708+05:302017-11-21T12:40:04.708+05:30Please help me to find the answer
Please help me to find the answer<br /><br /><br /><br />Anonymoushttps://www.blogger.com/profile/15216187284860779798noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-19015735973581181022017-11-21T12:39:27.087+05:302017-11-21T12:39:27.087+05:30Accept two different arrays and interchange itAccept two different arrays and interchange itAnonymoushttps://www.blogger.com/profile/15216187284860779798noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-21734100536185698252016-09-03T12:28:41.512+05:302016-09-03T12:28:41.512+05:30How can numbers between two arrays be swapped with...How can numbers between two arrays be swapped with their positions?joelhttps://www.blogger.com/profile/09852882716660751451noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-1361041821501576572015-10-16T14:23:20.024+05:302015-10-16T14:23:20.024+05:30if arrays are of un equal size then you just no ne...if arrays are of un equal size then you just no need to mention its size <br /><br />like:<br />int a[10]<br />int b[10]<br />answer to you is :<br />int a[size]<br />int b[size]Anonymoushttps://www.blogger.com/profile/09978217650282942809noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-41040259805419054242015-07-20T17:21:08.247+05:302015-07-20T17:21:08.247+05:30#include
#include
#include
int b[10],a[10],n,g,i,u...#include<br />#include<br />#include<br />int b[10],a[10],n,g,i,u;<br />void dd(int);<br />void main()<br />{<br />clrscr();<br />printf("enter ");<br />scanf("%d",&n);<br />if(n==0)<br />{<br />printf("please enter valid array");<br />goto g;<br />}<br />for(i=0;ig)<br />{<br />for(i=g;i<n;i++)<br />b[i]=a[i];<br />}<br />for(i=0;i<g;i++)<br />printf("கார்த்திக்https://www.blogger.com/profile/09470190226727814570noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-1610518635232680062014-06-11T20:41:37.112+05:302014-06-11T20:41:37.112+05:30can't we write the program with out using swap...can't we write the program with out using swap keyword using pointersAnonymoushttps://www.blogger.com/profile/02357946378978665255noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-37308862987043474242014-01-11T17:05:24.739+05:302014-01-11T17:05:24.739+05:30before dat in program they're reading 10 value...before dat in program they're reading 10 values for each arrayMahendranhttps://www.blogger.com/profile/07589957226376883092noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-483441697604052412014-01-11T17:02:24.807+05:302014-01-11T17:02:24.807+05:30just ur r swapping the elements of two arrays so, ...just ur r swapping the elements of two arrays so, I think no need of equal length to swap each otherMahendranhttps://www.blogger.com/profile/07589957226376883092noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-42955771208216982252014-01-01T14:41:23.894+05:302014-01-01T14:41:23.894+05:30why dont you dynamically allocate array and change...why dont you dynamically allocate array and change the addressanshulhttps://bamnosi.comnoreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-86355379689570600762013-07-28T21:38:12.678+05:302013-07-28T21:38:12.678+05:30can u write a program by using array......such as ...can u write a program by using array......such as <br />scanf 8 number then printf b[1]=1 b[2]=2 b[3]=3...b[8]=8 then convert it b[1]=8 b[2]=7....b[8]=1 ....please write this program...my fb id /mi.tanim.1Adminhttps://www.blogger.com/profile/11269813591414824218noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-18502234340899025912013-07-28T10:58:54.158+05:302013-07-28T10:58:54.158+05:30Same program by using pointers.
#include
void swa...Same program by using pointers.<br /><br />#include<br />void swap(int *, int *);<br />main()<br />{<br /> int a[10],b[10],i;<br /> printf("Enter First array->");<br /> for(i=0;i<10;i++)<br /> scanf("%d",&a[i]);<br /> printf("\nEnter Second array->");<br /> for(i=0;i<10;i++)<br /> scanf("%d",&b[i]);<br /> for(i=0;i<10;i++)<br Anandhttps://www.blogger.com/profile/12897918147526770947noreply@blogger.comtag:blogger.com,1999:blog-959939550345671470.post-60684902070222203492013-07-28T10:11:09.399+05:302013-07-28T10:11:09.399+05:30What to do if both arrays are of unequal length?
What to do if both arrays are of unequal length?<br />Anandhttps://www.blogger.com/profile/12897918147526770947noreply@blogger.com