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
How java is different from c and c++?
What is the best c++ ide?
What are virtual functions in c++?
What is encapsulation in C++? Give an example.
What does count ++ do in c++?
What is the difference between while and do while loop? Explain with examples.
What is a base class?
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?
In a function declaration what does extern means?
Explain the use of vtable.
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?
When should overload new operator on a global basis or a class basis?
What is a storage class used in c++?
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 .
what is a reference variable in C++?