文件名称:cpp1
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:8kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
C,C++ Questions
1. Base class has some virtual method and derived class has a method with the same name. If we initialize the base class pointer with derived
object,. calling of that virtual method will result in which method being called?
a. Base method
b. Derived method..
Ans. b
2. For the following C program
#define AREA(x)(3.14*x*x)
main()
{float r1=6.25,r2=2.5,a
a=AREA(r1)
printf("\n Area of the circle is f", a)
a=AREA(r2)
printf("\n Area of the circle is f", a)
}
What is the output?
Ans. Area of the circle is 122.656250
Area of the circle is 19.625000
3. What do the following statements indicate. Explain.
• int(*p)[10]
• int*f()
• int(*pf)()
• int*p[10]
Refer to:
-- Kernighan & Ritchie page no. 122
-- Schaum series page no. 323
-C,C++ Questions
1. Base class has some virtual method and derived class has a method with the same name. If we initialize the base class pointer with derived
object,. calling of that virtual method will result in which method being called?
a. Base method
b. Derived method..
Ans. b
2. For the following C program
#define AREA(x)(3.14*x*x)
main()
{float r1=6.25,r2=2.5,a
a=AREA(r1)
printf("\n Area of the circle is f", a)
a=AREA(r2)
printf("\n Area of the circle is f", a)
}
What is the output?
Ans. Area of the circle is 122.656250
Area of the circle is 19.625000
3. What do the following statements indicate. Explain.
• int(*p)[10]
• int*f()
• int(*pf)()
• int*p[10]
Refer to:
-- Kernighan & Ritchie page no. 122
-- Schaum series page no. 323
1. Base class has some virtual method and derived class has a method with the same name. If we initialize the base class pointer with derived
object,. calling of that virtual method will result in which method being called?
a. Base method
b. Derived method..
Ans. b
2. For the following C program
#define AREA(x)(3.14*x*x)
main()
{float r1=6.25,r2=2.5,a
a=AREA(r1)
printf("\n Area of the circle is f", a)
a=AREA(r2)
printf("\n Area of the circle is f", a)
}
What is the output?
Ans. Area of the circle is 122.656250
Area of the circle is 19.625000
3. What do the following statements indicate. Explain.
• int(*p)[10]
• int*f()
• int(*pf)()
• int*p[10]
Refer to:
-- Kernighan & Ritchie page no. 122
-- Schaum series page no. 323
-C,C++ Questions
1. Base class has some virtual method and derived class has a method with the same name. If we initialize the base class pointer with derived
object,. calling of that virtual method will result in which method being called?
a. Base method
b. Derived method..
Ans. b
2. For the following C program
#define AREA(x)(3.14*x*x)
main()
{float r1=6.25,r2=2.5,a
a=AREA(r1)
printf("\n Area of the circle is f", a)
a=AREA(r2)
printf("\n Area of the circle is f", a)
}
What is the output?
Ans. Area of the circle is 122.656250
Area of the circle is 19.625000
3. What do the following statements indicate. Explain.
• int(*p)[10]
• int*f()
• int(*pf)()
• int*p[10]
Refer to:
-- Kernighan & Ritchie page no. 122
-- Schaum series page no. 323
(系统自动生成,下载前可以参看下载内容)
下载文件列表
cpp1.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.