C Programming - Declarations and Initializations - Discussion
Discussion Forum : Declarations and Initializations - General Questions (Q.No. 7)
7.
Which of the following is not user defined data type?
1 : |
|
2 : |
|
3 : |
|
Answer: Option
Explanation:
C data types classification are
- Primary data types
- int
- char
- float
- double
- void
- Secondary data types (or) User-defined data type
- Array
- Pointer
- Structure
- Union
- Enum
So, clearly long int l = 2.35; is not User-defined data type.
(i.e.long int l = 2.35; is the answer.)
Discussion:
48 comments Page 2 of 5.
Jjjay said:
1 decade ago
We can't write long int l = 2.35;
If you want to declare long int.
Write it like this:
long int l=2.35L
If you want to declare long int.
Write it like this:
long int l=2.35L
Arpit said:
1 decade ago
string is a user defined datatype because we can define string as char name[20] string is an array of character.
Harsha said:
1 decade ago
@Jjjay.
We can write long int as.
Long int i = 2.35.
It is syntactically correct in c lang.
The question is which one is not user defined data type, as long int, int are predefined in c language.
We can write long int as.
Long int i = 2.35.
It is syntactically correct in c lang.
The question is which one is not user defined data type, as long int, int are predefined in c language.
Kumar said:
1 decade ago
So basically only secondary data types are user defined? am I correct.
Bal said:
1 decade ago
Hey I think m little bit confused user defined data types are typedef n enum and derived data types are structure array etc.
Ragaveni said:
1 decade ago
@Kavitha.
User defined datatypes are defined by user as per user convenience and these are defined by making use of predefined datatypes.
User defined datatypes are defined by user as per user convenience and these are defined by making use of predefined datatypes.
Sivaraman said:
1 decade ago
How to identify user-defined data type? Give example.
Snehal said:
1 decade ago
As you said int and float are not user defined data types then why answer 1, 2 is wrong?
Varshitha said:
10 years ago
What is the difference between user defined and derived datatypes?
Can you tell me what is void data type?
Can you tell me what is void data type?
Abhi said:
9 years ago
In 1, which is user-defined the data type.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers