C LANGUAGE
INFORMATION ABOUT C LANGUAGE
C is a high-level, general-purpose programming language that was originally developed in the 1970s by Dennis Ritchie at Bell Labs. It is a procedural language, which means that it follows a top-down approach to solving problems by breaking them down into smaller, more manageable tasks.
​
C is a compiled language, which means that code written in C must be compiled into machine code before it can be executed. This machine code can then be run on a variety of platforms, including desktop computers, embedded systems, and supercomputers.
​
One of the key features of C is its efficiency. Because it is a compiled language, C code can be optimized to run very quickly, making it a popular choice for system-level programming and other performance-critical applications. It also provides direct access to memory and low-level hardware features, making it a popular choice for developing device drivers and other system-level software.
​
C has a relatively small standard library, which means that many of the features that are common in other programming languages (such as input/output and string manipulation) must be implemented manually by the programmer. This can make C somewhat challenging to learn, especially for beginners.
​
However, C has influenced many other programming languages, including C++, Java, and Python. It continues to be widely used today in areas such as operating systems, embedded systems, and game development.
WHY LEARN C LANGUAGE
There are several reasons why someone might want to learn the C programming language:
​
-
Efficiency: C is a compiled language, which means that it can be optimized to run very quickly. This makes it a popular choice for system-level programming and other performance-critical applications.
-
Portability: C code can be compiled and run on a variety of platforms, including desktop computers, embedded systems, and supercomputers. This makes it a versatile language that can be used in a wide range of applications.
-
Low-level programming: C provides direct access to memory and low-level hardware features, making it a popular choice for developing device drivers and other system-level software.
-
Influence on other languages: C has had a major influence on many other programming languages, including C++, Java, and Python. By learning C, you can gain a deeper understanding of these other languages and how they work.
-
Job opportunities: Many companies and organizations use C for their software development needs. By learning C, you can increase your job opportunities in fields such as operating systems, embedded systems, and game development.
C PROGRAM
simple function in C:
#include <stdio.h>
int main() {
int num1, num2, sum;
printf("Enter first number: ");
scanf("%d", &num1);
printf("Enter second number: ");
scanf("%d", &num2);
sum = num1 + num2;
printf("Sum of %d and %d is %d\n", num1, num2, sum);
return 0;
}
C OUTPUT
Enter first number: 5
Enter second number: 7
Sum of 5 and 7 is 12