C问题 - 了解以下内容的答案 [英] C question -- Know the answers to the following

查看:53
本文介绍了C问题 - 了解以下内容的答案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

知道以下答案?


行包含


50 char * b,q,* r;

200 b = getbuf();

201 q = * b;

212 R =另一种功能(b);

213 -2003 / *我们想在这里使用''q''和''r''* /

2000 char * getbuf()

2001 {

2002 char buff [8];

2003-2050 / *这里定义的未指定buff * /

2051 return(char *)buff;

2052}


1.第201行执行后变量q中的内容是什么?在

下,这可能是什么情况呢?


2.是否有替代但相当的方式来写行

2000?如果是这样,它是什么?


3. getbuf()是否是一个合理的函数?


4. getbuf()是否会执行?


5.请在2051行评论。


6. getbuf()是不是很好的做法,为什么?


7.应该为编译提供哪些不给出的行?


8.如何才能获得第二个char *才能使用从这个功能返回

?根据所需的确切语法进行具体说明。 (那个

是,提供代码。)说明这个问题的另一种方法是如何修改这个

函数来返回''char *''(即,它从函数中维护

相同的返回类型),并在一个函数调用中额外添加''char *''值

。如果在外部调用

函数中不知道所需字符*的大小,请确保您的答案仍然有效。

。避免(不使用)C ++语法。在被叫和

调用函数中包含语句。使用食品编程实践。


9.对于那些了解SQL的候选人:有一个表格带有

gene_ids(''gid'')和clone_ids( '' CID '')。每个基因仅存在于单个克隆中,每个克隆可能含有多个基因。你怎么会发现每个克隆上有多少个基因?请提供

SQL。


10.系统调用和库函数之间有什么区别?

Know the answers to the following?

Line Contains

50 char *b, q, *r;
200 b = getbuf ();
201 q = *b;
212 R = anotherfunction (b);
213-2003 /* we want to use ''q'' and ''r'' here */
2000 char * getbuf ()
2001 {
2002 char buff [8];
2003-2050 /* unspecified buff defined here */
2051 return (char*) buff;
2052 }

1. What will be in variable ''q'' after line 201 is executed? Under
what conditions might this not be so?

2. Is there an alternative, but equivalent, way to write line
2000? If so, what is it?

3. Is getbuf() a reasonable function?

4. Will getbuf() execute at all?

5. Please comment on line 2051.

6. Is getbuf() good practice, and why?

7. What line not given should be provided for compilation?

8. How, exactly, could one get a second ''char*'' to use back from
this function? Be specific in terms of the exact syntax needed. (That
is, provide code.) Another way to state this question is how can this
function be modified to return a ''char*'' (that is, it maintains the
same return type) from the function, and an additional ''char *'' value
in one function call. Please make sure that your answer will work even
if the size of the char * desired is not known in the outside calling
function. Avoid (do no use) C++ syntax. Include statement in called and
calling functions. Use food programming practice.

9. For those candidates who know SQL: There is a table with
gene_ids (''gid'') and clone_ids (''cid''). Each gene only resides on a
single clone and each clone may contain multiple genes. How do would
you find how many genes are on each and every clone? Please provide the
SQL.

10. What''s the difference between system calls and library functions?

推荐答案

ml*****@gmail.com 写道:
知道以下答案吗?



< snip>

是的。除了5,因为那不是问题。


你呢?如果没有,更好地学习。


我会说提供的问题非常愚蠢。在上班或在有考试的地方学习之前,我会三思而后。


S.


<snip>
Yes. Except 5, since that''s not a question.

Do you? If not, better study harder.

I will say the questions provided are pretty stupid. I''d think twice
before going to work or study at a place giving such examinations.

S.

< br>


ml*****@gmail.com 写道:

[显而易见的家庭作业问题]


将来,如果你想要帮助做作业,最好不要切割和粘贴
这个任务是逐字的,你应该在

最少*尝试*自己回答问题。


如果你不理解任何问题,或者如果您希望我们

评论您的答案,请随时寻求帮助。但是不要

希望我们为你做功课。


ml*****@gmail.com wrote:
[obvious homework questions snipped]

In the future, if you want help with your homework, it would be best
not to cut and paste the assignment verbatim, and you should have at
least *tried* to answer the questions on your own.

If you do not understand any of the questions, or if you would like us
to comment on your answers, feel free to ask for help. But do not
expect us to do your homework for you.


ml ***** @ gmail.com 写了

(文章

< 11 ***** *****************@o13g2000cwo.googlegroups .com>):
ml*****@gmail.com wrote
(in article
<11**********************@o13g2000cwo.googlegroups .com>):
了解以下内容的答案?




做自己的功课。你有没有羞耻?


-

兰迪霍华德(2个删除FOOBAR)



Do your own homework. Have you no shame?

--
Randy Howard (2reply remove FOOBAR)


这篇关于C问题 - 了解以下内容的答案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆