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

Write a program to generate random numbers in c?

0 Answers  


What is a macro, and explain how do you use it?

0 Answers  


which operator having lowest precedence?? a.)+ b.)++ c.)= d.)%

4 Answers  


code for inverse a matrix

0 Answers  


How can I generate floating-point random numbers?

0 Answers  


Why does the call char scanf work?

0 Answers  


write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

0 Answers   Google,


what is the structure?

4 Answers   TCS,


How to removing white spces in c programming only bu using loops

2 Answers  


Implement bit Array in C.

0 Answers   GrapeCity,


What is volatile

2 Answers  


# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(x+2,y-10)); } the output of the program is a.8 b.6 c.7 d.none

7 Answers   Microsoft, TCS,


Categories