menu
Qammunity.org
Login
Register
My account
Edit my Profile
Private messages
My favorites
What is the output of the following code? int *p; int x; x = 12; p = &x; cout << x << ", "; *p = 81; cout << *p << endl;
Ask a Question
Questions
Unanswered
Tags
Ask a Question
What is the output of the following code? int *p; int x; x = 12; p = &x; cout << x << ", "; *p = 81; cout << *p << endl;
asked
May 2, 2018
114k
views
2
votes
What is the output of the following code? int *p; int x; x = 12; p = &x; cout << x << ", "; *p = 81; cout << *p << endl;
Computers & Tech
high-school
Chumie
asked
by
Chumie
7.8k
points
answer
comment
share this
share
0 Comments
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
3
votes
Without
#include <iostream>
using namespace std;
It probably won't compile, so no output.
The less pedantic answer:
12,81
on it's own line ( std.endl).
Lpt
answered
May 7, 2018
by
Lpt
8.2k
points
ask related question
comment
share this
0 Comments
Please
log in
or
register
to add a comment.
← Prev Question
Next Question →
Related questions
asked
Jul 10, 2020
193k
views
5. What is printed by the following code fragment? int x = 5, y = 3, *p = &x, *q = &y; std::cout << "x = " << x << ", y = " << y << '\\'; x = y; std::cout << "x = " << x << ", y = " << y << '\\'; x = 7; std::cout << "x = " << x << ", y = " << y << '\\'; *p = 10; std::cout << "x = " << x << ", y = " << y << '\\'; p = q; *p = 20; std::cout << "x = " << x << ", y = " << y << '\\';
Jason Kulatunga
asked
Jul 10, 2020
by
Jason Kulatunga
8.6k
points
Computers & Tech
middle-school
1
answer
2
votes
193k
views
asked
Mar 11, 2020
11.4k
views
Look at the following code.int x = 7;int *iptr = &x;What will be displayed if you send the expression *iptr to cout ? What happens if you send theexpression ptr to cout ?
Hugo Delsing
asked
Mar 11, 2020
by
Hugo Delsing
7.7k
points
Computers & Tech
high-school
1
answer
1
vote
11.4k
views
asked
Oct 28, 2024
86.9k
views
What will the following code display? int x = 0, y = 1, z = 2; cout << x << y << z << endl; A) 0 1 2 B) 0 1 2 C) xyz D) 012
Zayda
asked
Oct 28, 2024
by
Zayda
8.4k
points
Computers & Tech
high-school
1
answer
5
votes
86.9k
views
Ask a Question
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.
9.4m
questions
12.2m
answers
Categories
All categories
Mathematics
(3.7m)
History
(955k)
English
(903k)
Biology
(716k)
Chemistry
(440k)
Physics
(405k)
Social Studies
(564k)
Advanced Placement
(27.5k)
SAT
(19.1k)
Geography
(146k)
Health
(283k)
Arts
(107k)
Business
(468k)
Computers & Tech
(195k)
French
(33.9k)
German
(4.9k)
Spanish
(174k)
Medicine
(125k)
Law
(53.4k)
Engineering
(74.2k)
Other Questions
The book shows how to add and subtract binary and decimal numbers. However, other numbering systems are also very popular when dealing with computers. The octal (base 8) numbering system is one of these.
Seven basic internal components found in a computer tower
Please help me ! All you do is just put it it all in your own words ! Please this is for my reported card!i don't know how to put it in my own words because my English is not that good!
Twitter
WhatsApp
Facebook
Reddit
LinkedIn
Email
Link Copied!
Copy
Search Qammunity.org