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 / arun pateel

Answer is b

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How java is different from c and c++?

627


What is the best c++ ide?

591


What are virtual functions in c++?

674


What is encapsulation in C++? Give an example.

580


What does count ++ do in c++?

679






What is the difference between while and do while loop? Explain with examples.

587


What is a base class?

595


If a round rectangle has straight edges and rounded corners, your roundrect class inherits both from rectangle and from circle, and they in turn both inherit from shape, how many shapes are created when you create a roundrect?

655


In a function declaration what does extern means?

585


Explain the use of vtable.

611


what is software cycle? What is a mission critical system ? What is the important aspect of a real-time system ? Explain the difference between microkernel and macro kernel. Give an example of microkernel.Why paging is used ? Which is the best page replacement algo and Why ? What is software life cycle ? How much time is spent usually in each phases and why Which one do U want to work if selected in Honeywell ? Which are the different types of testing ? What is a distributed system ? Some questions about CSP. Which languages do U know ? What are the differences between Pascal and C. questions from Compiler construction and Lisp. Which are the different computer architecture? What is the requirement in MIMD ? What is the difference between RISC and CISC processors ? Difference between loosely coupled and tightly coupled systems ? What is an open system?

1761


When should overload new operator on a global basis or a class basis?

602


What is a storage class used in c++?

600


Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .

671


what is a reference variable in C++?

647