write a program to print the one dimensional array.



write a program to print the one dimensional array...

Answer / 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

More C Interview Questions

Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

0 Answers   Genpact,


What is scanf_s in c?

0 Answers  


What should malloc(0) do?

0 Answers  


What is the most efficient way to count the number of bits which are set in an integer?

0 Answers  


write a program to convert a expression in polish notation (postfix) to inline (normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix

0 Answers  






What are compound statements?

0 Answers  


Write a c program to print the sizes and ranges of different data types in c?

1 Answers  


Bit swapping

2 Answers  


when will be evaluated as true/ if(x==x==x) a) x=1; b) x=0; c) x=-1; d) none

7 Answers   HCL,


a.One Cannot Take the address of a Bit Field b.bit fields cannot be arrayed c.Bit-Fields are machine Dependant d.Bit-fields cannot be declared as static Which of the Following Statements are true w.r.t Bit-Fields A)a,b&c B)Only a & b C)Only c D)All

3 Answers   Accenture, Digg.com,


can you explain in brief what is "r+" mode in a file... i know that it si used to read and modify rhe existing content.... but explalanation about the file pointer in "r+" mode i wann to know???????????

2 Answers   Cognizant,


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

0 Answers  


Categories