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 is c++ iterator?
We all know that a const variable needs to be initialized at the time of declaration. Then how come the program given below runs properly even when we have not initialized p?
What are the 2 main types of data structures?
What is a binary file? List the merits and demerits of the binary file usagein C++.
Explain the virtual inheritance in c++.
How do you initialize a string in c++?
Define the process of error-handling in case of constructor failure?
Why are arrays usually processed with for loop?
Tell me difference between constant pointer and pointer to a constant.
Explain differences between new() and delete()?
Can you please explain the difference between static and dynamic binding of functions?
What is a concrete class?