Question
What is the output of the following C++ code? #include using namespace std; int main() { int x = 5; int &ref = x; ref = 10; int *ptr = &x; *ptr += 5; cout << x << " " << ref; return 0; }
More C Programming Questions
- In mobile computing, which type of network allows devices to connect directly to each other without using a central router or switch?
- Which C operator is used to access a value at a memory address stored in a pointer?
- In C++, which access specifier allows members to be accessible only within the class?
- In Java, which method is used to start a thread?
- In Python, which method is used to convert a string to lowercase?
- What is the output of the following C code? int arr[5] = {10, 20, 30, 40, 50}; int *p = arr; printf("%d", *(p+2) + *(arr+3) - *(p+1));
- Which Python statement is used to create an empty set?
- In C++, which feature allows hiding the internal details of a class?
- In C, which function is used to dynamically allocate memory?
- In C++, a base class pointer holds the address of a derived class object. The base class declares a non-virtual member function that the derived class rede...
Hey! Ask a query
Please enter email id
The email must be a valid email address.
Please enter Mobile Number
Please enter valid Mobile Number
Please enter your Doubt
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
- 200 Questions with Detailed Solutions
- Section-wise Coverage (GA, English, Quant & Reasoning)