write a program to insert an element at the specified
position in the given array in c language

Answer Posted / bhagya

#include<stdio.h>
#include<conio.h>
void main()
{
char c[20]="this is a string";
int n;
printf("en etr index value to which the element has to
be inserted");
c[n]=getchar();
printf("the string after inserted");
printf("%s",c);
getch();
}

Is This Answer Correct ?    25 Yes 55 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between array and linked list in c?

854


Can a pointer point to null?

784


What happens if a header file is included twice?

784


What is difference between class and structure?

817


Are the expressions * ptr ++ and ++ * ptr same?

855


What is the difference between Printf(..) and sprint(...) ?

1059


write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.

3557


provide an example of the Group by clause, when would you use this clause

1952


Describe the header file and its usage in c programming?

814


Differentiate between a structure and a union.

1000


Why do some versions of toupper act strangely if given an upper-case letter?

829


What is the symbol indicated the c-preprocessor?

934


How can I write a function analogous to scanf?

882


#include #include struct stu { int i; char j; }; union uni { int i; char j; }; void main() { int j,k; clrscr(); struct stu s; j=sizeof(s); printf("%d",j); union uni u; k=sizeof(u); printf("%d",k); getch(); } what is value of j and k.

5757


When should the volatile modifier be used?

878