C Language Tips & Tricks

C Language Tips & Tricks

Creator of C Programming Language

EVERY GOOD TREE PRODUCES GOOD FRUIT

Opening Many Secrets of C Language

General Misconceptions about C Language

  • It is tough to learn
  • It has no future 
  • The demand is decreasing day by day
  • To learn this language Mathematics is compulsory
  • Students who gets more marks can only learn C language easily
  • It is not easy to learn for everybody
  • Difficult to cover all features of C
  • You can not build the confidence by learning C due to toughness of the language
  • It is difficult to build a logic in C
  • Spoken English is compulsory to become a good programmer

Everything is mentioned above is NOT AT ALL TRUE

NOW LET US UNDERSTAND FACTS ABOUT C LANGUAGE

  • It is Easy to Learn
  • It has a Great Future for Freshers and it is the Mother of all languages 
  • There is always a demand for C due to its capability to interact with the Hardware
  • Mathematics is not at all required to learn C Language
  • Any body can learn C language irrespective of University marks
  • It is absolutely suitable for all streams
  • It is possible to cover important features which is required in Development 
  • You can build the confidence by learning C language without any doubts
  • You can easily learn to build a necessary logic in C 
  • English is not at all needed to become a Programmer in Software industry

Conclusion

Anybody can learn C language irrespective of your qualification and it is the best way to begin with C Programming

Mahesh Kondawar Administrator
Head Trainer cum Mentor at , ENCODE SOFTWARE ACADEMY
Worked as a Freelance Trainer cum Mentor for Computer Science, Information Technology and Soft Skills in some reputed organizations like Western Coal Fields, Hitachi Finance, and Mahindra Rise. Currently Head Trainer at ENCODE SOFTWARE ACADEMY, Nagpur
follow me

 

T H E   W I S E   L I S T E N  T O   A D V I C E

Opening Many Secrets of C Language

Still Why C is Importance Language

According to The Software TIOBE programming community index of 2020 

 
TIOBE programming community index is a measure of popularity of programming languages, created and maintained by the TIOBE Company based in Eindhoven, the Netherlands. TIOBE stands for The Importance of Being Earnest, the title of an 1895 comedy play by Oscar Wilde.
 
 The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. It is important to note that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.
 
The following Graph show the exact status upto year 2020.
 
 
          Conclusion
Again C will be the emerging language of the year 2019 and continue to maintain second position according to the TIOBE graphical presentation.
 
 

 

Mahesh Kondawar Administrator
Head Trainer cum Mentor at , ENCODE SOFTWARE ACADEMY
Worked as a Freelance Trainer cum Mentor for Computer Science, Information Technology and Soft Skills in some reputed organizations like Western Coal Fields, Hitachi Finance, and Mahindra Rise. Currently Head Trainer at ENCODE SOFTWARE ACADEMY, Nagpur
follow me

A Good Person gives life to others

Opening Many Secrets of C Language

What is ANSI C

When C was developed many changes have been done by many people. So to make standard version of C, one committee is appointed and they made C language as a Standard format for all programmers and it was called ANSI C.There is a difference between C programming and DOS programming. Many programmers misunderstand that C programming is DOS programming. But, there is a huge difference between C programming and DOS programming. C programming always refers to ANSI C. Now it is called International Standard Organisation ISO C.
 
ANSI C does not have getch( ) functions because it is a DOS function. Go to the Documentation section of Turbo c++ Help and see the table of Portability.
 
Generally, UNIX based compilers follow ANSI standard but DOS and Windows based compilers follows their own standards. 
 

CODING TECHNIQUES 

  1. Code should be less in size and faster in execution
  2. A very good code readability is must for any programmer
  3. Code should use all the good features of the language
 

           Conclusion

Learning any programming Language and to become a good programmer is entirely a different phenomenon.

 

 

Mahesh Kondawar Administrator
Head Trainer cum Mentor at , ENCODE SOFTWARE ACADEMY
Worked as a Freelance Trainer cum Mentor for Computer Science, Information Technology and Soft Skills in some reputed organizations like Western Coal Fields, Hitachi Finance, and Mahindra Rise. Currently Head Trainer at ENCODE SOFTWARE ACADEMY, Nagpur
follow me

The only criteria is to make your fundamentals very strong

Opening Many Secrets of C Language

C Programming Tips and Tricks Every Programmer Should Know

 

Powerful Tips to Follow 

  1. Set your Compiler to ANSI C and write main( ) function in correct way.  main( ) should be declared as
    int main( void )
    {
    :
    :
    return ( 0 ); /* or return( EXIT_SUCCESS ); */
    }
  2. The statement exit( ) also returns values to the operating system as the return( ) in main( ). The exit takes only two values 0 and 1. (Many people use exit(2), exit(3)…. All these are wrong!) So exit should be used as:
    a) For normal termination exit( 0 ); or exit( EXIT_SUCCESS);
    b) For abnormal termination exit( 1 ); or exit( EXIT_FAILURE);
  3. If the “grammar” was not defined for a given particular operation, it is called as “Undefined”. So each compiler would give different answers for a given particular operation. Usually compilers won’t check such ‘Undefined’ usage. So it is our responsibility to check it. Example
    char buffer[5];
    strcpy(buffer, “Hello World”); /* Undefined */
    For example the operation of copying a string to buffer, which is smaller than the string is
    ‘Undefined’. That means Dennis Ritchie didn’t say (or define) anything about such operations. Frequently Asked Undefined Questions
    a) What is the output of following code?
    int i = 7;
    printf( “%d”, i++ * i++ );
    b) What would happen to the array after executing the following statements?
    int a[5], i = 1;
    a[i] = i++;
    c) What is the value of i after the execution of the following statement?
    int i = 7;
    i = ++i;
    These idiotic questions are very often asked in Indian Programming world. The outputs are undefined. Even if such questions are asked, the right answer will be “the result is undefined”.
  4. Nothing can beat the efficiency of Assembly language. A good optimizing C compiler will convert C file to a better assembly code. But a good human Assembly programmer can write much more tight and efficient code. If you are such an efficient-superb Assembly programmer,
    fortunately there is a way to link those assembly codes with C and so you can improve your program.
  5. Programmers so often praise C for its pointers. Pointers are more powerful.  Believe it or not, using pointers, we can even reboot our system.

 Conclusion

From above implementation, C is basically use for System Level programming like building Shell and Kernel through C codes 

Mahesh Kondawar Administrator
Head Trainer cum Mentor at , ENCODE SOFTWARE ACADEMY
Worked as a Freelance Trainer cum Mentor for Computer Science, Information Technology and Soft Skills in some reputed organizations like Western Coal Fields, Hitachi Finance, and Mahindra Rise. Currently Head Trainer at ENCODE SOFTWARE ACADEMY, Nagpur
follow me

Everyone who asks will receive

Opening Many Secrets of C Language

C Programming Tips and Tricks Every Programmer Should Know

 

Everything About Compiler with Reference to C Language 

By 1985, there were enough C compilers for MS-DOS machines to warrant a benchmark article. They were Aztec C, Control C, C Systems C, Computer Innovations C86, Datalight C, DeSmet C, Digital Research C, EcoSoft C, Lattice C, Mark Williams C, Microsoft C, Software Toolworks C, and Wizard C. Fourteen in all.

In 1986 the number was up to 17, and another benchmark article followed. Digital Research C and Control C were gone from the list, but Datalight added something called the “Datalight Kit,” and the new ones were Hot C, IBM C, High C, Mix C, and Whitesmiths C.

Where are they all now? The first, Microsoft C, was really a repackaged Lattice compiler that Microsoft sold until their own in-house compiler was ready. Datalight changed to Zortech and moved up to C++. Wizard moved west and joined Borland to become Turbo C. The Turbo C that was being developed in-house left Borland and became TopSpeed C. Mix C became Power C. Digital Research C became extinct. Mark Williams C became Let’s C

ONLY A THOUGHT BUT DO NOT MAKE ANY CONCLUSION

An IDE, or “Integrated Development Environment” will turn you stupid. They are the worst tools if you want to be a good programmer because they hide what’s going on from you, and your job is to know what’s going on. They are useful if you’re trying to get something done and the platform is designed around a particular IDE, but for learning to code C (and many other languages) they are pointless. 

Limitation of Turbo C Compiler

Turbo C compiler just permits us to access 1 MB Memory

Stack + Heap , Both shares same segments memory in Turbo C

Turbo C doesn’t support dynamic and dynamic loaded library

Multiple process and threads program are not possible in Turbo C

Socket/Network programming is not possible in Turbo C

ODBC Programming is not possible in Turbo C

Turbo C supports poor graphics , dose not support 32 bits graphics

Turbo C maximum open 20 number of files at a time

Heap segment size is just 64 KB in Turbo C

Pointer maximum addressable space is just 1 MB memory

Every memory cell has a 20 bits physical address , but due to register size used by Turbo C is 16 bits , So memory models only control the pointers in Turbo C

Locking mechanism are not implemented in Turbo C

System Call implementations are not in Turbo C

Memory Protection is not their in Turbo C

No Kernel Space and User Space used in Turbo C

Turbo C supports only 512 bytes buffer size

Turbo C , though based on MSDOS , it dose not supports different tools for program analysis

C is a language for System programmer and it is powerful , but Turbo C does not support that much power what C gives

Conclusion

It depends upon the nature of your program. So, find the best solution for your program and use the compiler as per the program need.

Mahesh Kondawar Administrator
Head Trainer cum Mentor at , ENCODE SOFTWARE ACADEMY
Worked as a Freelance Trainer cum Mentor for Computer Science, Information Technology and Soft Skills in some reputed organizations like Western Coal Fields, Hitachi Finance, and Mahindra Rise. Currently Head Trainer at ENCODE SOFTWARE ACADEMY, Nagpur
follow me

Mahesh Kondawar

Working as a Freelance Trainer cum Mentor for IT & CS in reputed organizations. I have nearly 22 Years of experience as a Trainer in Information Technology subjects and worked as a Freelance Trainer in some reputed organizations like Western Coal Fields, Hitachi Finance, and Mahindra Rise.

This Post Has 4 Comments

  1. Nitish Thawari

    BEST INFORMATION BLOG I EVER SEEN. I LIKE YOUR CONTENT VERY MUCH SIR.

    1. encodetr-admin

      Thank you Nitish

    1. encodetr-admin

      Ok. No problem.

Leave a Reply