德尔福笔试软件类docWord文档下载推荐.docx
《德尔福笔试软件类docWord文档下载推荐.docx》由会员分享,可在线阅读,更多相关《德尔福笔试软件类docWord文档下载推荐.docx(25页珍藏版)》请在冰豆网上搜索。
3.Whatarethevaluesofa,b,andcafterthefollowinginstructions:
inta=5,b=7,c;
c=a+++b;
4,Whatdothefollowingdeclarationsmean?
a)constinta;
b)intconsta;
c)constint*a;
d)int*consta;
e)intconst*aconst;
5.Whichofthefollowingstatementsdescribetheuseofthekeyword static?
a)Withinthebodyofafunction:
Astaticvariablemaintainsitsvalue betweenfunctionrevocations
b)Withinamodule:
Astaticvariableisaccessiblebyallfunctions withinthatmodule
c)Withinamodule:
Astaticfunctioncanonlybecalledbyother functionswithinthatmodule
6.Embeddedsystemsalwaysrequiretheusertomanipulatebitsin registersorvariables.Givenanintegervariablea,writetwocodefragments.
Thefirstshouldsetbit5ofa.Thesecondshnuldclearbit5ofa.Inboth cases,the remainingbitsshouldbeunmodified.
7.Whatdoesthefollowingfunctionreturn?
charfoo(void)
{
unsignedinta=6;
ihtb=-20;
charc;
(a+b>
6)?
(c=1):
(c=0);
returnc;
}
8.WhatvaluesareprintedwhenthefollowingCprogramisexecuted?
inti=8;
voidmain(void)
(
9.WhatwillbetheoutputofthefollowingCcode?
main()
intk,num=30;
k=(num>
5?
(num<
=10?
100:
200):
500);
printf("
%d"
k);
10.WhatwillthefollowingCcodedo?
int*ptr;
ptr=(int*)Ox67a9;
ptr=Oxaa55;
11.WhatwillbetheoutputofthefollowCcode?
defineproduct(x)(x*x)main()
inti=3,j,k;
j=product(i++);
k=product(++i);
%d%d"
j,k);
.SimplifythefollowingBooleanexpression!
((i==)||(j>
15))
13.Howmanyflip-flopcircuitsareneededtodivideby16?
14.Provides3propertiesthatmakeanOS,aRTOS?
15.Whatispre-emption?
16.AssumetheBCregistervalueis8538H,andtheDEregister valueis62A5H.FindthevalueofregisterBCafterthefollowing assemblyoperations:
MOVA,C
SUBE
MOVC,A
MOVA,B
SBBD
MOVB,A
17.IntheAssemblycodeshownbelow
LOOP:
MVIC,78H
DCRC
JNZLOOP
HLT
HowmanytimesistheDCRCOperationexecuted?
18.Describethemostefficientway(intermofexecutiontime andcodesize)todivideanumberby4inassemblylanguage
2020-01-04
b)Withinamodule:
18.Describethemostefficientway(intermofexecutiontime andcodesize)todivideanumberby4inassem