Question 3490 – Environment
February 16, 2024Question 17260 – NTA UGC NET JUNE 2023 Paper-1
February 16, 2024Question 2492 – KVS 30-12-2018 Part B
What shall be the output of the following program in C++(using turbo C++)?
#include<iostream.h>
float answer;
main()
{
answer=⅓;
cout<<”The value of ⅓ is” <<answer,,”\n”;
return(0);
}
Correct Answer: A
Question 18 Explanation:
The expression answer=⅓ , which is integer divide by integer operation .
Modulus operation gives the quotient values when one number is divided by another number .
When 1 is divide by 3, the quotient is o
Modulus operation gives the quotient values when one number is divided by another number .
When 1 is divide by 3, the quotient is o
The value of ⅓ is 0
The value of ⅓ is 0.33
The value of ⅓ is 0.3333
The value of ⅓ is 1/3
Subscribe
Login
0 Comments