Write a corrected statement in c++ so that the statement
will work properly. if (x > 5); y = 2*x; else y += 3+x;
Answer / rose
if(x>5)
{
y=2*x
}
else
{
int temp;
temp=3+x;
y+= temp;
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Why would you make a destructor virtual?
How can we access protected and private members of a class?
What are static member functions?
What does std :: flush do?
What is pointer -to-members in C++? Give their syntax?
What is the extension of c++?
Differentiate between structure and class in c++.
What is the output of: String a1 = "Hello"; String a2 = "world!"; String* s1 = &a2; String& s2 = a1; s1 = &a1; s2 = a2; std::cout << *s1 << " " << s2 << std::endl;
Why do we use vector in c++?
What is near, far and huge pointers? How many bytes are occupied by them?
What kind of problems can be solved by a namespace?
Does c++ vector allocate memory?