write program on arrays
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
How can I determine whether a machines byte order is big-endian or little-endian?
What are the ways to a null pointer can use in c programming language?
In the following control structure which is faster? 1.Switch 2.If-else and which consumes more memory?
list the no of files created when c source file is compiled
suppose we use switch statement and we intilize years name using enum statement like(jan,feb,mar,------dec) we take integer value as an input .question is that the month which we analyz is from 0 to 11 bt if i enter 12 than how he again starts from begning and print jan
How does #define work?
Explain what?s happening in the first constructor: public class c{ public c(string a) : this() {;}; public c() {;} } How is this construct useful?
What are header files and what are its uses in C programming?
What would the following code segment printint k = 8;docout << "k = " << k << " ";while k++ < 5; a) 13 b) 5 c) 8 d) pointers
How is pointer initialized in c?
What is the stack in c?
What is the difference between fread and fwrite function?