What is the output of the following code: : int maino { const int SIZE = 5; int x[] = { 1, 2, 3, 4, 5 }; int *p = x; int
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
What is the output of the following code: : int maino { const int SIZE = 5; int x[] = { 1, 2, 3, 4, 5 }; int *p = x; int
Assume the file "nums.txt" contains the characters "45 99 22 355", spaces included. What is the output of the following code? fstream f("nums.txt", ios::in); f.seekg(11, ios::beg); int x; f >> X; cout << X << endl;
What is the output of the following program? #include <iostream> #include <fstream> using namespace std; int main() { fstream file; file.open("sample.txt", ios::out); file << "0123456789"; cout<<"Position: « file.tellp() << endl; file.closeO; TH return 0; }
What is the output? #include <iostream> using std::cout; void fun(int *ptr) { *ptr = 30; } int main() { int y = 20; fun(&y); cout << y; return 0; }