write program on arrays

Answers were Sorted based on User's Feedback



write program on arrays ..

Answer / antony

#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],i;
for(i=1;i<=10;i++)//getting data from user
{
scanf("%d",&a[i]);
}
for(i=1;i<=10;i++)//print the data
{
printf("%d",a[i])
}
getch();
}

Is This Answer Correct ?    6 Yes 1 No

write program on arrays ..

Answer / rina

#include<stdio.h>
#include<conio.h>
void main()
{
int i,a[5],n;
clrscr();
printf("\nenter the no.");
scanf("%d",&n);
for(i=1;i<=5;i++)
{
scanf("%d",&a[i]);
}
for(i=1;i<=5;i++)
{
printf("%d",a[i]);
}
getch();
}

Is This Answer Correct ?    1 Yes 1 No

write program on arrays ..

Answer / shrish cahndra tripathi

#include<sotdio.h>
#include<conio.h>
void main()
{
int a[5];
int b=1;
while b<5;
printf("/n enter value of a1");
scanf("%d",a0);
printf("/n enter value of a1");
scanf("%d",a1);
printf("/n enter value of a1");
scanf("%d",a2);
printf("/n enter value of a1");
scanf("%d",a3);
printf("/n enter value of a1");
scanf("%d",a4);
printf("/n values are :- %d, %d, %d, %d, %d"a[i]);
getch();
clrscr();
}

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More C Interview Questions

to find out the reverse digit of a given number

6 Answers   Infosys, Microsoft, TCS, Wipro,


difference between native and cross compilers

0 Answers  


how does the C compiler interpret the following two statements p=p+x; q=q+y; a.p=p+x; q=q+y b.p=p+xq=q+y c.p=p+xq; q=q+y d.p=p+x/q=q+y

4 Answers   TCS,


What is n in c?

0 Answers  


Can you please explain the difference between malloc() and calloc() function?

0 Answers  






Difference between strcpy() and memcpy() function?

0 Answers  


What does sizeof return c?

0 Answers  


difference between c and c++?

2 Answers  


write a programming in c to find the sum of all elements in an array through function.

0 Answers  


Explain demand paging.

1 Answers   Agilent,


What is an arrays?

0 Answers  


Differentiate Source Codes from Object Codes

1 Answers  


Categories