If a=5, b=6, c=7, b+=a%c*2. What is the final value of b?
The above line of the code gets executed using the C++ program, the output will give 10 as value of b at the prompt. It will process the b+=(5%7*2), as b values is already given as 6 then it will add, to the assigned value to the result got from the expression. if properly syntaxes and executed the program.
Is This Answer Correct ? | 0 Yes | 0 No |
What is oops in programming?
What are benefits of oop?
Why do we need oop?
What do you mean by pure virtual functions?
Which type does string inherit from?
function overridind means and simple program
What is encapsulation selenium?
#include <iostream> using namespace std; int main() { int a = 3; int c[5][5]; for (int x=0;x<5;x++) { for (int y=0;y<5;y++) { c[x][y] = x*y; } } cout << c[a][2]; }
explain defference between structure and class with example
explain dynamic binding by drowing
for example A,B,C,D are class all the 4 class contain one method who() but the method who() implementaion is differnet among each class. the relation among the 4 class are A is base class and is inherited by B and C.and from this two B and C where D is inherited. the question is i want to display the output who() method in all the classes(A,B,C,D)the output of who() method is diferrent amond all the class(A,B,C,D) ------A------ virtuval who(print a) override | | who(print b) B C override who(print c) | | -------D------ override who(print d)
Can anyone please explain runtime polymorphism with a real time example??at what ciscumstances we go for it??