write a program to print the one dimensional array.

Answer Posted / manish soni

#include<stdio.h>
#include<conio.h>
void main()
{
int
printf("enter how many no");
scanf("%d",&n);
//arrary input;
for(i=0;i<n;i++)
{
printf("Enter elements %d ",i+1);
scanf("%d",&a[i]);
}
//array output;
for(i=0;i<n;i++)
printf("output at position [%d]is=%d\n",i+1,a[i]);
getch();
}

Is This Answer Correct ?    3 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is structure pointer in c?

565


Explain what is the difference between functions abs() and fabs()?

611


What are the differences between Structures and Arrays?

595


What language is lisp written in?

606


What is scope of variable in c?

549






What is variable initialization and why is it important?

609


What does 1f stand for?

602


What is the meaning of typedef struct in c?

579


How can I read in an object file and jump to locations in it?

564


in iso what are the common technological language?

1623


How do you construct an increment statement or decrement statement in C?

731


Can include files be nested?

619


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

620


What is the use of getch ()?

617


What is #define in c?

606