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 difference between scanf and gets?

709


Explain what is the difference between #include and #include 'file' ?

671


What does s c mean on snapchat?

682


int far *near * p; means

3217


What is define c?

673






What is wild pointer in c?

715


What is substring in c?

726


How do we open a binary file in Read/Write mode in C?

802


What is sizeof c?

715


What is the difference between functions getch() and getche()?

711


Explain the difference between call by value and call by reference in c language?

753


Can you assign a different address to an array tag?

800


what do u mean by Direct access files? then can u explain about Direct Access Files?

1731


Does sprintf put null character?

690


What are the preprocessor categories?

715