C++
What will ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
What will be the value of a
c
variable after the following code's execution:
int a=4; int b=3; double c=a/b;
1
1.333333
2
Compilation error will occur
Explanation
Since a and b are of
int
type, then a/b will perform an integer division, therefore a/b = 1.
data-type-conversion
implicit-conversion
operators
integer division
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
C
++
Quiz
Login to learn C++
or
Read more about
C++ Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment