Read two numbers from keyboard and find maximum of them?



Read two numbers from keyboard and find maximum of them?..

Answer / venugopal

#include<stdio.h>
#include<conio.h>

main()
{
int first,sec;
clrscr();
printf("enter two no's");
scanf("%d %i",&first,&sec);

if(first>sec)
{
printf("%i is big",first);
}
else
printf("%d is big",sec);
getch();
}

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More C Interview Questions

#include<stdio.h> main() { char *p1; char *p2; p1=(char *) malloc(25); p2=(char *) malloc(25); strcpy(p1,"Ramco"); strcpy(p2,"Systems"); strcat(p1,p2); printf("%s",p1); } Tell me the output?

6 Answers   Ramco,


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

0 Answers  


What is the most efficient way to count the number of bits which are set in an integer?

0 Answers  


how can i get output like this? 1 2 3 4 5 6

6 Answers   Excel,


atoi, which takes a string and converts it to an integer. write a program that reads lines(using getline), converts each line to an integer using atoi and computes the average of all the numbers read. also compute the standard deviation

0 Answers  






WHAT IS PRE POSSESSORS?

6 Answers   TATA,


Explain what is the difference between text files and binary files?

0 Answers  


Why static variable is used in c?

0 Answers  


What is enumerated data type in c?

0 Answers  


how to swap 4 number without using temporary number?

2 Answers  


What do you mean by dynamic memory allocation in c? What functions are used?

0 Answers  


Write a main() program that calls this function at least 10 times. Try implementing this function in two different ways. First, use an external variable to store the count. Second, use a local variable. Which is more appropriate?

2 Answers  


Categories