ccplusplus.com
Learn C, C++ Concepts
Sunday, December 25, 2011
auto storage class in c example
/*********************************************************************** * File : register.c * Author : Saurabh Gupta * Desc : reigster and auto storage class in V * Source : http://ccplusplus.com/p/c.html * Created : PM 03:36 25 December 2011 * Note : ************************************************************************/ #include
int main () { register float a = 0.00; auto int bb = 1; auto char cc = 'w'; printf ("I am register now - a = %f\n", a); printf ("I am auto now - bb = %d\n", bb); printf ("I am auto now - cc = %c\n", cc); return 0; } /* * OUTPUT * [sgupta@rhel6x64 c]$ gcc register.c -o register [sgupta@rhel6x64 c]$ ./register I am register now - a = 0.000000 I am auto now - bb = 1 I am auto now - cc = w [sgupta@rhel6x64 c]$ */
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment