n n n
questions and correct answers
n n n n
Dividing na nprogram ninto nfunctions:
-is nthe nkey nto nobject-oriented nprogramming.
-makes nthe nprogram neasier nto nconceptualize.
n-may nreduce nthe nsize nof nthe nprogram.
-makes nthe nprogram nrun nfaster. n- nCORRECT nANSWERS--makes nthe
nprogram neasier nto nconceptualize.*
n-may nreduce nthe nsize nof nthe nprogram.
A nfunction nname nmust nbe nfollowed nby n______
{ nand n}
n[ nand n]
( nand n)
< nand n> n- nCORRECT nANSWERS-correct n( nand n)
A nfunction nbody nis ndelimited nby n______
{ nand n}
[ nand n]
( nand n)
< nand n> n- nCORRECT nANSWERS-{ nand n}
A nC++ ninstruction nthat ntells nthe ncomputer nto ndo nsomething nis ncalled na(n)
n_____
expression
statement
declaration
command n- nCORRECT nANSWERS-statement
An nexpression
- nusually nevaluates nto na n
numerical nvalue.
-indicates nthe nemotional nstate nof nthe nprogram.
-always noccurs noutside na nfunction.
-may nbe npart nof na nstatement. n- nCORRECT nANSWERS-*usually nevaluates nto
na nnumerical nvalue.
or
*correct nmay nbe npart nof na nstatement.
A nvariable nof ntype nchar ncan nhold nthe nvalue n301.
,true
false n- nCORRECT nANSWERS-false
What nkind nof nprogram nelement nis n12 n
-integer nconstant
-character nconstant
-floating-point nconstant
-variable nname nor nidentifier
-function nname
-malformed nor notherwise nincorrect ncode n- nCORRECT nANSWERS-integer
nconstant
What nkind nof nprogram nelement nis n'a' n
-integer nconstant
-character nconstant
-floating-point nconstant
-variable nname nor nidentifier
-function nname
-malformed nor notherwise nincorrect ncode n- nCORRECT nANSWERS-character
nconstant
What nkind nof nprogram nelement nis n4.28915
-integer nconstant
-character nconstant
-floating-point nconstant
-variable nname nor nidentifier
-function nname
-malformed nor notherwise nincorrect ncode n- nCORRECT nANSWERS-floating-
point nconstant
What nkind nof nprogram nelement nis nJungleJim?
-constant
-character nconstant
-floating-point nconstant
-variable nname nor nidentifier
-function nname
-malformed nor notherwise nincorrect ncode n- nCORRECT nANSWERS-variable
nname nor nidentifier
What nkind nof nprogram nelement nis nJungleJim()?
-integer nconstant
-character nconstant
-floating-point nconstant
-variable nname nor nidentifier
-function nname
, -malformed nor notherwise nincorrect ncode n- nCORRECT nANSWERS-function
nname
What nkind nof nprogram nelement nis n0xAF
-integer nconstant
-character nconstant
-floating-point nconstant
-variable nname nor nidentifier
-function nname
-malformed nor notherwise nincorrect ncode n- nCORRECT nANSWERS-integer
nconstant
Which nof nthe nfollowing nIS na nVALID nvariable nname?
-index n2
-index-2
-2index
-counter_2_index n- nCORRECT nANSWERS-counter_2_index
Choose nthe ncorrect ndescription nof nthe nfollowing ntwo nlines nof ncode.
n#include n<header1> n
n#include n"header2.h"
-Look nfor nheader1 nin nthe ncurrent ndirectory nand nheader2.h nwhere nsystem
nheader nfiles nare nstored
-Look nfor nheader1 nwhere nsystem nheader nfiles nare nstored nand nheader2.h nin
nthe ncurrent ndirectory
-header1 nis na nprogram-specific nheader nfile
-header2.h nis na nsystem nheader nfile n- nCORRECT nANSWERS-Look nfor
nheader1 nwhere nsystem nheader nfiles nare nstored nand nheader2.h nin nthe ncurrent
ndirectory
What ndoes nthe nfollowing ncode nprint?
int nx n= n10; n
int na n= nx++; n
cout n<< na n<< n" n" n<< nx n<< nendl;
11 n11
11 n10
10 n10
10 n11 n- nCORRECT nANSWERS-10 n11
What ndoes nthe nfollowing ncode nprint?
int nx n= n10; n
int na n= n--x; n
cout n<< na n<< n" n" n<< nx n<< nendl;