湖边的白杨树

探索是一种乐趣

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  218 随笔 :: 1 文章 :: 14 评论 :: 59万 阅读
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  Quiz

摘要:What is WPF?WPF (Windows Presentation foundation) is a graphical subsystem for displaying user interfaces, documents, images, movies etc in windows ap... 阅读全文
posted @ 2016-01-12 19:30 fdyang 阅读(553) 评论(0) 推荐(0) 编辑

摘要:A binary tree is defined as a tree where each node can have no more than two children.Building a Binary Search Tree:首先创建一个节点Class public class BtNo... 阅读全文
posted @ 2015-11-20 16:20 fdyang 阅读(720) 评论(0) 推荐(0) 编辑

摘要:A abstract class An abstract class is a class that must be inherited and have the methods overridden. It can not be instantiated. And at least one of 阅读全文
posted @ 2015-11-15 21:11 fdyang 阅读(412) 评论(0) 推荐(0) 编辑

摘要:1. Convert string from "AAABBCC" to "A3B2C2". 当面试者提出这个问题的时候,首先需要确认题意:譬如:字符串是不是顺序的,是否有字符重复出现。 例如: ABBAACB , AAABBCCCBBAA。 如果是顺序的话可以一次遍历字符,如果是杂序的话,需要2次遍 阅读全文
posted @ 2015-11-15 21:10 fdyang 阅读(791) 评论(0) 推荐(0) 编辑

摘要:这个是非常基本的一道面试题,但是要考虑周全。首先反转一个字符串:基本思路是变成Char数组,然后调用C#里面的方法,或者设定两个index,从头,尾向中间遍历,并交换。方法一: Array.Reverse(char *). 注意在开始的时候要判断字符串为null或空。 public s... 阅读全文
posted @ 2015-11-14 12:19 fdyang 阅读(6862) 评论(0) 推荐(0) 编辑

摘要:const int amust be initializedinitialization must be at compile timereadonly int acan use default value, without initializinginitialization can be at ... 阅读全文
posted @ 2015-05-25 13:39 fdyang 阅读(234) 评论(0) 推荐(0) 编辑

摘要:C Statichttp://stackoverflow.com/questions/572547/what-does-static-mean-in-a-c-programStatic could be used for (1) variable and (2) function.A static ... 阅读全文
posted @ 2015-05-14 12:10 fdyang 阅读(271) 评论(0) 推荐(0) 编辑

摘要:Q. What's the process and threads and what's the difference between them?A. A process is an executing program. One or more threads run in the context ... 阅读全文
posted @ 2015-04-13 22:24 fdyang 阅读(247) 评论(0) 推荐(0) 编辑

摘要:QuestionKey wordsAnwserAassignment operator abstract class It is a class that has one or more pure virtual functions. assignment & initialization ... 阅读全文
posted @ 2015-04-12 20:08 fdyang 阅读(308) 评论(0) 推荐(0) 编辑

摘要:Q: What is a class?A: A class is an expanded concept of a data structure: instead of holding only data, it can hold both data and functions.Q: What ar... 阅读全文
posted @ 2015-04-12 19:57 fdyang 阅读(243) 评论(0) 推荐(0) 编辑

摘要:Q: What is a dangling pointer?A: A dangling pointer arises when you use the address of an object after its lifetime is over. This may occur in situati... 阅读全文
posted @ 2015-04-12 19:46 fdyang 阅读(177) 评论(0) 推荐(0) 编辑

摘要:Q: What is the difference betweennew/delete and malloc/free?A: Malloc/free do not know about constructors and destructors. New and deletecreate and de... 阅读全文
posted @ 2015-04-12 19:37 fdyang 阅读(159) 评论(0) 推荐(0) 编辑

摘要:Constructors/Destructors.我们都知道,在C++中建立一个类,这个类中肯定会包括构造函数、析构函数、复制构造函数和重载赋值操作;即使在你没有明确定义的情况下,编译器也会给你生成这样的四个函数。例如以下类: class CTest{public: CTest(); ... 阅读全文
posted @ 2015-04-12 18:47 fdyang 阅读(494) 评论(0) 推荐(0) 编辑

摘要:1.简述sizeof和strlen的区别 最常考察的题目之一。主要区别如下: 1)sizeof是一个操作符,strlen是库函数。 2)sizeof的参数可以是数据的类型,也可以是变量,而strlen只能以结尾为‘\0‘的字符串作参数。 3)编译器在编译时就计算出了... 阅读全文
posted @ 2015-04-10 13:40 fdyang 阅读(292) 评论(0) 推荐(0) 编辑

摘要:注: 如下的题目皆来自互联网,答案是结合了自己的习惯稍作了修改。1. 求一个数的二进制中的1的个数。int func(int x){ int count = 0; while (x) { count++; x = x& (x - 1); } ... 阅读全文
posted @ 2015-04-05 23:03 fdyang 阅读(832) 评论(0) 推荐(0) 编辑

摘要:1.new、delete、malloc、free关系new/delete是C++的运算符。new 调用构造函数用于动态申请内存,delete调用对象的析构函数,用于释放内存。malloc与free是C++/C语言的标准库函数, 也是用来申请和释放内存。由于malloc/free是库函数而不是运算符,... 阅读全文
posted @ 2014-11-16 18:33 fdyang 阅读(1166) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示