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:
49 comments Page 4 of 5.
Pankaj said:
2 decades ago
#include<stdio.h>
int main()
{
enum var {var1,var2,var3};
enum num {num1=5,num2,num3};
printf("%d %d %d \n",var1,var2,var3);
printf("%d %d %d",num1,num2,num3);
return 0;
}
int main()
{
enum var {var1,var2,var3};
enum num {num1=5,num2,num3};
printf("%d %d %d \n",var1,var2,var3);
printf("%d %d %d",num1,num2,num3);
return 0;
}
Kavitha said:
2 decades ago
int float char also not a userdefiend data then why it comes answer is both 1 and 2
Padma said:
2 decades ago
Yes kavi but there is a user defined data type. It is not in it.
Thanvi said:
2 decades ago
What is the difference b/w primitive n nonprimitive data type?
Levin max said:
2 decades ago
Primitive data types are already predefined data types as such as int , float,double etc. whereas non primitive data types are created by d users as such as objects in java....
Krishna said:
2 decades ago
Which is the nonprimitive datatype in c++?
Krishna said:
2 decades ago
Can you explain me the union operation?
Shan_mani said:
2 decades ago
Can you explain the enum operation?
Manas said:
2 decades ago
Primitive types are declaration types and the primitive type is already defined by the java programming language. There are eight primitive types defined in java: int, char, boolean, short, void, long, float, double.
Non primitive types are called java reference types and they have name starting with capital letter. Eg: Integer, Float etc.
Non primitive types are called java reference types and they have name starting with capital letter. Eg: Integer, Float etc.
Rakesh kumar said:
1 decade ago
Can you explain me in detail the difference between structure, union and enum operations?
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers