1. What does the following do:
void afunction(int *x)
{
x=new int;
*x=12;
}
int main()
{
int v=10;
afunction(&v);
cout<<v;
}
a) Outputs 12
b) Outputs 10
c) Outputs the address of v
Answer Posted / guest
Ten(10) is the out put
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is buffer and example?
To which numbering system can the binary number 1101100100111100 be easily converted to?
How do pointers work?
Define vptr.
What are compilers in c++?
Is c# written in c++?
What do the keywords volatile and mean mutable?
Define the process of error-handling in case of constructor failure?
Define copy constructor.
Explain the operation of overloading of an assignment operator.
What is difference between n and endl in c++?
Can a program run without main in c++?
What are built-in functions? What is the syntax for the definition?
Define basic type of variable used for a different condition in C++?
There are 100 students in a class. The management keep information in two tables. Those two tables are given like Roll no Name Age 001 ABC 15 002 XYZ 14 and Roll No Subject Marks 001 Math 75 001 Physics 55 002 Math 68 001 Hindi 69 They want the information like this Roll No Name Hindi Physics Math Total 001 ABC 69 55 75 199 002 XYZ 68 74 84 226 And Roll No Suject Highest 001 Math 98 007 Physics 84 021 Hindi 74 All 275 All information is kept in structure in main memory. You have to find last two tables.