Data type interview questions

1. What is use of void data type?
2. What is size of int data type in c?
3. What will happen if we will assign a value to float variable which is beyond the range of float data type?
4. Write down three derived data types in c.
5. Can we use signed keyword with double? Why?  
6. Why range of signed char is -128 to 127 not -127 to 128?
7. What is cyclic nature of int data type?
8. What will be output of following c code?
void main(){
    char i=250;
    printf(“%d”,i);
}
9. What is volatile keyword in c?
10. It is necessary to initialize the const variable in c?

9 comments:

Unknown said...

1)

what is void data type
Void is an empty data type normally used as a return type in C/C++, C#, Java functions/methods to declare that no value will be return by the function.
The another used of void is to declare the pointer in C/C++ where It is not sure what data type is addressed by the pointer.
eg:
void *p;
Here p can hold the address of int or float or char or long int or double.

Unknown said...

1)Built-in data types
Fundamental data types (int, char, double, float, void, pointer)
Derived data types (array, string, structure)

2)Programmer-defined data types
Structure
Union
Enumeration

Unknown said...

programmer defined data types also called as user defined data types

360digitmgas said...

This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck. data science course in coimbatore

Data Science pune said...

Such a very useful article. Very interesting to read this article. I would like to thank you for the efforts you had made for writing this awesome article.
Data Science Course in Pune
Data Science Training in Pune

Data Science Institute In Banglore said...

Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.
Data Science Institute in Bangalore

Data Science Certification In Bangalore said...

After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article.
Data Science Certification in Bangalore

DataScience Datascience said...

Wow, happy to see this awesome post. I hope this think help any newbie for their awesome work. By the way thanks for share this awesomeness from
Data Science Course in Bangalore

DataScience Datascience said...

Please give some advice on how to achieve this kind of posts.
Data Science Training in Bangalore