Q: How to unlimit the size of the stack?
Solution: setrlimit() is used to unlimit the size of the stack.
Q: In Linux, how do the heaps and stacks are managed?
Solution: In virtual memory, We can keep track of all the objects and access them much faster than any another.
Q: Which is used to pass the large objects in c++?
Solution: Because by using pass by reference we need to pass only address location, So it can save a lot of memory.
Q: What are the essential operators in c++?
Solution: Essential operators in c++ are +, |, <=.
Q: In which direction does the assignment operation will take place?
Solution: In assignment operation, the flow of execution will be from right to left only.
Q: Pick out the compound assignment statement.
Solution: When we want to modify the value of a variable by performing an operation on the value currently stored, We will use compound assignment statement. In this option, a -=5 is equal to a = a-5.
Q: What is the associativity of add(+);?
Solution: left to right is the associativity of add(+);.
Q: What is the name of | operator?
Solution: | operator is used to find the βorβ of given values.
Q: Which operator is having the highest precedence in c++?
Solution: Scope resolution operator is having the highest precedence in c++.
Q: What will be the output of the following C++ code? #includeusing namespace std; int main() { int a = 20; int b = 10; int c = 15; int d = 5; int e; e = a + b * c / d; cout << e << endl ; return 0; }
Solution: In this program, the value e is evaluated by precedence ad we got the output as 50. Output: $ g++ ess4.cpp $ a.out 50
You Have Score    | /10 |