C Questions
C Questions
#include<stdio.h>
#define M 10
main()
{
/*----------------Declaration of Variables----------------------*/
int i;
int sum ;
/*-----------------Initialization of Values----------------*/
sum=avg=0;
}
Devang Page 2 10/15/2008
2) The various data types supported in C are basically divided into 4 types: primary
or fundamental, user-defined, derived and empty data set.
The Primary Data Type are mainly divided into 3 types which are sub-divided into
many types like:
main()
{
int a; /*------int range : -32,768 to 32,767-------*/
short int c; /*------short int range : -127 to 128-------*/
long int d; /*------long int range : -2,147,483,648 to 2,147,483,647-------*/
a=30007;
c=120;
d=89654785;
e=954651.6216549;
f=1.6E;
g=’M’;
RESULT:
a=30007
c=120
d=89654785
e=954651.6216549
f=1.6E
g=M