write a program that takes two numbers from user that
prints the smallest number
Answers were Sorted based on User's Feedback
Answer / hemant jakkani
#include <stdio.h>
#include <string.h>
main()
{
int x,y;
scanf("%d%d",&x,&y);
if(x>y)
printf("First Number is greater: %d",x);
else
printf("Second Number is greater:%d",y);
}
| Is This Answer Correct ? | 6 Yes | 1 No |
Answer / vaishnavi
#include<iostream.h>
void main()
{
int a,b;
cout<<"Enter two numbers";
cin>>a>>b;
if(a>b)
cout<<a<<"is greater";
else
cout<<b<<is greater";
}
| Is This Answer Correct ? | 2 Yes | 1 No |
What are function poinetrs? where are they used?
What is the use of pointer in c++ with example?
Differentiate between declaration and definition.
What is the purpose of templates in c++?
How is static data member similar to a global variable?
What are friend classes? What are advantages of using friend classes?
Are strings mutable in c++?
Explain the benefits of proper inheritance.
What is "strstream" ?
Why cout is used in c++?
What is a virtual destructor?
Can a constructor return a value?