C Variables and Datatypes-3
1. Array is ______ datatype in C Programming language.
a) Derived Data type
b) Primitive Data type
c) Custom Data type
d) None of these
Answer: A
Array is a Derived Datatype.
2. When double is converted to float, the value is?
a) Rounded
b) Truncated
c) Depends on the standard
d) Depends on the compiler
Answer: D
When double is converted to float, the value will be depends on the compiler.
3. Which of the following is not a data type?
a) Symbolic Data
b) Alphanumeric Data
c) Numeric Data
d) Alphabetic Data
Answer: A
Data types are of three basic types: Numeric, Alphabetic and Alphanumeric. Numeric Data consists of only numbers.
Alphabetic Data consists of only letters and a blank character and alphanumeric data consists of symbols.
4. *@Ac# is a type of ________________ data.
a) Symbolic
b) Alphanumeric
c) Alphabetic
d) Numeric
Answer: A
Alphanumeric data consists of symbols. Alphanumeric data may be a letter, either in uppercase or lowercase or some special symbols like #,^,*,(, etc.
5. What are the entities whose values can be changed called?
a) Constants
b) Variables
c) Modules
d) Tokens
Answer: B
Variables are the data entities whose values can be changed. Constants have a fixed value. Tokens are the words which are easily identified by the compiler.
6. BOOLEAN is a type of data type which basically gives a tautology or fallacy.
a) True
b) False
Answer: A
A Boolean representation is for giving logical values. It returns either true or true. If a result gives a truth value, it is called tautology whereas if it returns a false term, it is referred to as fallacy.
7. ______________ define how the locations can be used.
a) Data types
b) Attributes
c) Links
d) Data Objects
Answer: B
Attributes can determine how any location can be used. Attributes can be type, name, component, etc. Data objects are the variables and constants in a program.
8. Which is correct with respect to size of the datatypes?
a) char > int > float
b) int > char > float
c) char < int < double
d) double > char > int
Answer: C
char has lesser bytes than int and int has lesser bytes than double in any system.
9. Which of the datatypes have size that is variable?
a) int
b) struct
c) float
d) double
Answer: B
Since the size of the structure depends on its fields, it has a variable size.
10. What is short int in C programming?
a) Basic data type of C
b) Qualifier
c) short is the qualifier and int is the basic datatype
d) All of the mentioned
Answer: C
short, long, signed and unsigned are the qualifiers used before datatypes to make some changes to them.