program to find a smallest number in an array
Answer Posted / asif ali afsar
#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],b,c,n;
clrscr();
printf("How many size you want to Cheah\n");
scanf("%d",&n);
printf("Enter the numbers\n");
for(b=0; b<n; b++)
{
scanf("%d",&a[b]);
}
for(b=0; b<n; b++)
{
if(c<a[b])
{
c=c;
}
else
{
c=a[b];
}
}
printf("smalest no is %d",c);
getch();
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
Explain zero based addressing.
Explain how do you sort filenames in a directory?
Why is #define used?
What does the c preprocessor do?
What is null in c?
List the different types of c tokens?
What is a loop?
What are called c variables?
If the size of int data type is two bytes, what is the range of signed int data type?
What is extern c used for?
pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)
What is actual argument?
What does %c do in c?
What are control structures? What are the different types?
How do you use a 'Local Block'?