Browsing all articles in Tips
Sep
30

List of all standard version of c language

Author JIGAR PATEL    Category c, Tips, tutorials     Tags , ,

As  you all know we always talk about ANSI C, ISO-C, C99,c88 ,etc…but we dont know the actual differences between these all version of c language. So here i am going to explained all versions of c language.

Brief  History :

  • Root of c language is started in 1966 when Martin Richards  has designed  BCPL (Basic Combined Programming Language), that was  a procedural, imperative, and structured computer programming language .
  • After that in 1669 Ken Thompson and Dennis Ritchie has designed  B  programming language  at Bell Labs

K&R C :

In 1978, Brian Kernighan and Dennis Ritchie published the first edition of The C Programming Language. Which is  known to C programmers as “K&R”. For most of the year this book was taken as the informal standard of c programming language.
read more

Sep
27

How post-increment & pre-increment both are evaluated in function argument?

While surfing internet i came to following scenario. The behavior of bellow’s function i can not understand .Can you know why this output comes ?

#include<stdio.h>
   int main() {
   int a=5;
   printf("%d %d %d",a++,a++,++a);
   return 0;
   } 

read more

Sep
26

Concept of Octal literal in C

One day while debugging  one code i got one interesting things ..let me explain you by bellow’s  example.

#include<stdio.h>
main()
{
int a=010;
printf("a is %d",a);
}

if you think output of this program will

“a  is  10″

then your are missing something….

read more

Sep
25

How to set, clear ,toggle and check a single bit in C?

As being an embedded software engineer i would really suggest you this tricks. ..!  In many  application you need to deal with this bit wise operation. Sometimes you know this all stuff very well but still some time it takes  time to construct this logic or some time you got some mistakes in it. so i suggest you to paste this on your desk until you paste this in your mind..!

To set a bit

Use the bitwise OR operator (|) to set a bit.

 number |= 1 << x; 

That will set bit x.

read more

Sep
23

How to count total line of code in whole project/directory?

In many case you will require to count total number of line of code in your project.So here i am going to introduce with one powerful tool for counting line of code. That is CLOC .

  ABOUT TOOL :

CLOC is open source project.  CLOC  is written entirely in Perl language and CLOC is almost portable .

ClOC can works on

  • many flavors of Linux,
  • Mac OS X,
  • AIX,
  • Solaris, IRIX,
  • z/OS

read more

Follow us on Twitter! Follow us on Twitter!

Search in this website

our sponsors

latest comments

Find us on Facebook

Top Authors

35 posts
saurabh
21 posts
9 posts

Find us on stackoverflow

Polls

Tell us who you are

View Results

Loading ... Loading ...

My Bookmarks

Sponsers Link