Write a program that accepts an array of numbers, and two
numbers (an element and a
position in the array) and inserts the given element into
nth position of the array.
Answers were Sorted based on User's Feedback
Answer / surabhi
void main()
{
int x[6],item,pos,i,n;
printf("\n enter no of elements to be inserted:");
scanf("\n %d",&n);
for(i=0;i<n;i++)
{
printf("\n enter elements:");
scanf("%d",&x[i]);
}
printf("\n enter item to be inserted:");
scanf("%d",&item);
printf("\n enter position:");
scanf("%d",&pos);
for(i=n;i<=pos-1;i--)
{
x[i+1]=x[i];
}
x[pos-1]=item;
printf("\n elements after insertion:");
for(i=0;i<=n;i++)
{
printf("\n %d",x[i]);
}
getch();
}
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / lince
Dim num() As Integer = {5, 3, 6, 7, 1}
num.SetValue(3, 2)
| Is This Answer Correct ? | 0 Yes | 0 No |
Can you please explain the difference between value and reference types?
Which is the tool which can convert visual basic old version to .net compatibility version?
Is there any easy way to convert VB6 programs to VB.Net?
What are the differences between server-side and client-side code?
Explain what observations between vb.net and vc#.net?
Explain the difference between vb.net and c#, related to oops concepts?
What is enumerator?
Explain about the performance of visual basic?
What is MSIL
Do event have return type?
Explain about branching logic control in vb.net?
What is visual basic.net culture?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)