C Programming and Computer Geeks: c course online

Search MY Blog

Showing posts with label c course online. Show all posts
Showing posts with label c course online. Show all posts

Tuesday, 24 December 2013

C Language Advantages



Advantages
Ø  C language is a base or building block for many other currently known languages.

Ø  C language has varieties of data types and powerful operators. Due to this, programs written in C language are efficient, fast and easy to understand.


Ø  C is highly portable language. C programs written for one computer can easily run on another computer without any change or by doing a little change.

Ø  There are only 32 keywords in ANSI C and its strength lies in its built in functions. Several standard functions are available for developing programs.


Ø  Another important advantage of C language is its ability to extend itself.
A C program is basically a collection of functions that are supported by the C library this makes us easier to add our own functions to C library. Due to the availability of large number of functions, the programming task becomes simple.

Ø  C Programming is a structured programming language. This makes developers to think of a problem in terms of function modules or blocks. The Collection of these modules makes a complete program or software. This modular structure makes program debugging, testing and maintenance more easier.

C Language Advantages over C++
C vs C++


Disadvantages

Ø  There is no runtime checking in C language.
Ø  There is no strict type checking. For example, we can pass an integer value for the floating or character data type.
Ø  C does not have concept of OOPs, that’s why C++ is developed.
Ø  C does not have the concept of namespace.

Ø  C does not have the concept of constructor or destructor.

Saturday, 21 December 2013

Difference between Compiler and Interpreter

The main difference between Compiler and Interpreter is:
Compiler translates the program statements(Source Code) into Machine Code in one go i.e. all lines of program simultaneously. That's why all compiler based languages shows all the errors together.

While interpreter translates the source code into machine code one statement at a time. That's why program execution cannot proceed to next statement until the previous error is corrected/rectified.

Find more C Concepts here..

Thursday, 19 December 2013

String to Integer conversion function


int strtoint(char str[])
{
  int i=0,num=0;
    
  while (str[i]!='\0')
  {
     num=num*10+str[i]-'0';
     i++;
  }

  printf("Entered String = \"%s\" , After String to Int = %d",str, num);

  return num;
}

Output:

String to Integer Conversion
string to integer

 
Click here for more C Faq

Search This Blog