Did you know this about C?

Posted: February 29, 2012 in Technology
Tags: , , ,

smallest compilable program:
main;

smallest executable program:
main();

declaration of an integer global/function variable without using keyword int:
var1;
main(var2,var3){}

another way to declare the variables without using datatype keywords:
__typeof(1) var_name; //declares a variable of integer type
__typeof(1.0) var_name; //declares a variable of double type

reading garbage input without storing it to any variable
scanf(“%*s”);

You can separate the words using multiline comments characters instead of space:
int/**/var1,var2;

Well C is a powerful language and with years, so many features have been added to the language which we don’t use in daily life programming as a developer but its always fascinating to know the hidden concepts of a programming language as a programmer. Happy Programming.

Advertisements
Comments
  1. Eimear Fraid says:

    The people who are doing the work are the moving force behind the Macintosh. My job is to create a space for them, to clear out the rest of the organization and keep it at bay. Steve Jobs

  2. […] continuation to the post const char *p,**p2; char *c,**c2; p=c; //no warning c=p; //warning a const pointer to a non const […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s