Question 3490 – Environment
February 16, 2024
NTA UGC NET JUNE 2023 Paper-1
February 16, 2024
Question 3490 – Environment
February 16, 2024
NTA UGC NET JUNE 2023 Paper-1
February 16, 2024

KVS 30-12-2018 Part B

Question 18
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);
}
A
The value of ⅓ is 0
B
The value of ⅓ is 0.33
C
The value of ⅓ is 0.3333
D
The value of ⅓ is 1/3
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
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
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x