program to find a smallest number in an array
Answer Posted / .::get lost::.
#include<stdio.h>
#include<conio.h>
void main()
{
int a[20],n,i,s;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
s=a[0];
for(i=0;i<n;i++)
{
if(s>a[i])
{
s=a[i];
}
}
printf("the smallest number is %d",s);
getch();
}
| Is This Answer Correct ? | 24 Yes | 10 No |
Post New Answer View All Answers
Why do we use stdio h and conio h?
explain what are pointers?
By using C language input a date into it and if it is right?
What is output redirection?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
How can you allocate arrays or structures bigger than 64K?
Do you know what are the properties of union in c?
how do you programme Carrier Sense Multiple Access
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
I need a sort of an approximate strcmp routine?
How can type-insensitive macros be created?
What is a c token and types of c tokens?
How can I write a function that takes a format string and a variable number of arguments?
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
What is scope of variable in c?