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 |
Describe delete operator?
Explain the difference between struct and class in terms of access modifier.
what is the order of initialization for data?
10 Answers Amazon, TCS, Wipro,
What is a volatile variable in c++?
What do nonglobal variables default to a) auto b) register c) static
Explain about profiling?
What is an undefined reference/unresolved external symbol error and how do I fix it?
How would you implement a substr() function that extracts a sub string from a given string?
Why do we use classes in programming?
What are associate containers?
difference between c and c++?
38 Answers Cognizant, IBM, Infosys, Oracle, Sarva Shiksha Abhiyan, Wipro,
What is a .h file c++?