31.?Executing?in?the?Command?Window?the?following?code
? ??x = [1:3.4; -6:3.5:0.5] ; size(x)?
? returns??
a.? error?message?
b.? 2?? ?2??
c.? 2?? 3?
d.? 3?? 3?
e.? none?of?the?above? Ans: a
32. To add a comment to the mfile, the MATLAB command is
A ) %
B ) ;
C ) comment(' ')
D ) &
Ans: a
33. When used in the fprintf command, the %g is used as the
A ) single character display
B ) fixed point display
C ) string notation display
D ) default number display
Ans: d
34. When used in the fprintf command, the \n is used to
A ) add a space between any two characters
B ) add a line space (enter key)
C ) place a number into the comment
D ) clear the comment
Ans: b
35. To display 'Question 2' in the command window, the correct command is
A ) disp(Question 2)
B ) display('Question 2')
C ) disp('Question 2')
D ) Question 2
Ans: c
36. The clc command is used to
A ) clear the command window
B ) erase everything in the mfile
C ) clean the desktop
D ) save the existing mfile
Ans: a
37. The num2str command
A ) converts a number to string
B ) converts string to a number
C ) concatenates numbers and strings
D ) concatenates strings
Ans: a
38. The output of the last line is
aa=2
as=num2str(aa)
cat=['cat' as]
A ) cat2
B ) cat 2
C ) ??? Undefined function or variable 'as'
D ) cat aa
Ans: a
39. To join one or more strings into a single string is known as
A ) concatenation
B ) joining
C ) string conversion
D ) string theory
Ans: a
40. The output of
cat=['cat' 'dog']
is
A ) catdog
B ) cat dog
C ) cat&dog
D ) CatDog
Ans: a
? ??x = [1:3.4; -6:3.5:0.5] ; size(x)?
? returns??
a.? error?message?
b.? 2?? ?2??
c.? 2?? 3?
d.? 3?? 3?
e.? none?of?the?above? Ans: a
32. To add a comment to the mfile, the MATLAB command is
A ) %
B ) ;
C ) comment(' ')
D ) &
Ans: a
33. When used in the fprintf command, the %g is used as the
A ) single character display
B ) fixed point display
C ) string notation display
D ) default number display
Ans: d
34. When used in the fprintf command, the \n is used to
A ) add a space between any two characters
B ) add a line space (enter key)
C ) place a number into the comment
D ) clear the comment
Ans: b
35. To display 'Question 2' in the command window, the correct command is
A ) disp(Question 2)
B ) display('Question 2')
C ) disp('Question 2')
D ) Question 2
Ans: c
36. The clc command is used to
A ) clear the command window
B ) erase everything in the mfile
C ) clean the desktop
D ) save the existing mfile
Ans: a
37. The num2str command
A ) converts a number to string
B ) converts string to a number
C ) concatenates numbers and strings
D ) concatenates strings
Ans: a
38. The output of the last line is
aa=2
as=num2str(aa)
cat=['cat' as]
A ) cat2
B ) cat 2
C ) ??? Undefined function or variable 'as'
D ) cat aa
Ans: a
39. To join one or more strings into a single string is known as
A ) concatenation
B ) joining
C ) string conversion
D ) string theory
Ans: a
40. The output of
cat=['cat' 'dog']
is
A ) catdog
B ) cat dog
C ) cat&dog
D ) CatDog
Ans: a
No comments:
Post a Comment