Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 04
1-
Which of the following correctly represents a long double constant?
A -
6.68
B -
6.68L
C -
6.68f
D -
6.68LF
2-
Which of the structure is incorrcet?
1 : struct aa
{
int a;
float b;
};
2 : struct aa
{
int a;
float b;
struct aa var;
};
3 : struct aa
{
int a;
float b;
struct aa *var;
};
A -
1
B -
2
C -
3
D -
1, 2, 3
3-
Which of the structure is correct?
1 : struct book
{
char name[10];
float price;
int pages;
};
2 : struct aa
{
char name[10];
float price;
int pages;
}
3 : struct aa
{
char name[10];
float price;
int pages;
}
A -
1
B -
2
C -
3
D -
All of above
4-
1 : typedef long a;
extern int a c;
2 : typedef long a;
extern a int c;
3 : typedef long a;
extern a c;
A -
1 correct
B -
2 correct
C -
3 correct
D -
1, 2, 3 are correct
5-
A long double can be used if range of a double is not enough to accommodate a real number.
A -
True
B -
False
6-
A float is 4 bytes wide, whereas a double is 8 bytes wide.
A -
True
B -
False
7-
If the definition of the external variable occurs in the source file before its use in a particular function, then there is no need for an extern declaration in the function.
A -
True
B -
False
8-
Size of short integer and long integer can be verified using the sizeof() operator.
A -
True
B -
False
9-
Range of double is -1.7e-38 to 1.7e+38 (in 16 bit platform - Turbo C under DOS)
A -
True
B -
False
10-
Size of short integer and long integer would vary from one platform to another.