typedef in C language Reviewed by Momizat on . typedef is used to give a new name to standard datatype or creates synonym's of a standard datatypes. [php] // Syntax: typedef standarddatatype newname typedef typedef is used to give a new name to standard datatype or creates synonym's of a standard datatypes. [php] // Syntax: typedef standarddatatype newname typedef Rating: 0

typedef in C language

typedef is used to give a new name to standard datatype or creates synonym’s of a standard datatypes.

// Syntax: typedef standarddatatype newname

typedef int manish;

Example:Input a decimal number and print it actual number using typedef.

#inclide;
#inclide;
typedef int raj;
main(){
	clrscr();
	raj x,a,b=0,x=1;
	printf("Enter a No :");
	scanf("%d",&x);
	while(x>0){
		a=x%8;
		b=b+(a*c);
		c=c*10;
		x=x/8;
	}
	printf("Actual no: %d",b);
	getch();

}

Leave a Comment

© 2014 Powered By