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 the mean of function?

799


What does c mean before a date?

780


What are all different types of pointers in c?

724


What is the difference between ++a and a++?

887


How the c program is executed?

813






why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above

772


What are the 4 types of programming language?

708


please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com

1511


What is the use of a semicolon (;) at the end of every program statement?

1026


What is the size of enum in c?

783


What is unsigned int in c?

699


Explain how can you avoid including a header more than once?

754


What is meant by int main ()?

880


FILE *fp1,*fp2; fp1=fopen("one","w") fp2=fopen("one","w") fputc('A',fp1) fputc('B',fp2) fclose(fp1) fclose(fp2)} a.error b. c. d.

1454


Which is more efficient, a switch statement or an if else chain?

734