How to write a C program to determine the smallest among
three nos using conditional operator?
Answers were Sorted based on User's Feedback
Answer / sai
#include<stdio.h>
#include<conio.h>
void main()
{
int n1,n2,n3,small;
clrscr();
printf("Enter three numbers");
scanf("%d%d%d",&n1,&n2,&n3);
small=n1<n2?(n1<n3?n1:n3):(n2<n3?n2:n3);
printf("smallest number is:%d",small);
printf("press any key to close");
getch();
}
Is This Answer Correct ? | 32 Yes | 11 No |
Answer / azad sab;e,chiplun
void main()
{
int n1,n2,n3,small;
clrscr();
printf("Enter three numbers");
scanf("%d%d%d",&n1,&n2,&n3);
small=n1<n2?(n1<n3?n1:n3):(n2<n3?n2:n3);
printf("smallest number is:%d",small);
printf("press any key to close");
}
getch();
}
Is This Answer Correct ? | 24 Yes | 21 No |
Blade logic interview question. 1st round is a written tests with 15 multiple questions from c and c++. All are simple basic question. Like int main () { Int i=65; Return printf(ā%cā, i); } 2nd and 3rd round is technical interview. The position for which I was interview was core UNIX and c. Yes it is for system programming. The company has product name blade server. For their server they are creating their own command for their purpose. Example cd command. We can implement it in a c program by using the chdir() function. So the question asks related to PID, fork, pipe, shared memory, signal. Write a program in c which will act as cp command.
1 Answers BladeLogic, Infosys,
What is wrong with this program statement?
WHAT IS THE DEFINATION OF IN TECHNOLOGY AND OFF TECHNOLOGY ?
What are the characteristics of arrays in c?
What is ambagious result in C? explain with an example.
write a program to fined second smallest and largest element in a given series of elements (without sorting)
Can a binary search tree be used as an index? If yes, how? Explain
If 4 digits number is input through the keyboard, Write a program to calculate sum of its 1st & 4th digit.
How to add two numbers with using function?
wap in c to accept n number display the highest and lowest value
Can anyone help me with this please? Need to print the below values.. Thanks 1 1 2 1 2 3 1 2 3 4
what are threads ? why they are called light weight processes ? what is the relation between process and threads ?