ComputerHow to

What is C (programming language)? And how it usefull!

C is a general-purpose computer programming language, pronounced like the letter C. Dennis Ritchie invented it in the 1970s, and it is still quite popular and influential. The capabilities of the targeted CPUs are clearly reflected in C’s features by design. Operating systems, device drivers, and protocol stacks have continued to utilise it, albeit application software usage has decreased[6]. The tiniest microcontrollers and embedded devices to the greatest supercomputers all use the programming language C.

C, a replacement for the programming language B, was initially created by Ritchie at Bell Labs between 1972 and 1973 to create utilities for Unix. It was used to reimplement the Unix operating system’s kernel.[7] C rapidly grew in prominence in the 1980s. Almost all current computer architectures and operating systems have access to C compilers, making it one of the most popular programming languages[8][9]. Since 1989, ANSI (ANSI C) and the International Organization for Standardization have standardised C. (ISO).

With a static type system and support for structured programming, lexical variable scope, and recursion, C is an imperative procedural language. It was intended to be built, with minimum runtime assistance, to offer low-level memory access and language features that easily translate to machine instructions. Although the language has low-level capabilities, it was created to promote cross-platform development. With just few source code modifications, a standards-compliant C programme built with portability in mind may be produced for a broad range of computing platforms and operating systems.

Since 2000, the TIOBE index, which gauges the popularity of programming languages, has continuously placed C among the top two languages.

Relations to other languages

C++, C#, the C shell in Unix, D, Go, Java, JavaScript (including transpilers), Julia, Limbo, LPC, Objective-C, Perl, PHP, Python, Ruby, Rust, Swift, Verilog, and SystemVerilog are only a few of the many languages that have directly or indirectly borrowed from C. (hardware description languages). [5] Many of the control mechanisms and other fundamental elements of these languages are derived from C. The majority of them (Python being a notable exception) also express syntax that is quite similar to that of C, and they frequently combine C’s recognised expression and statement syntax with fundamentally distinct type systems, data structures, and semantics.

Printing “Hello World!”, In C Language

int 
main
() {
  
printf
("Hello World!");
  return 0;
}

Reserved words in C Language

auto
break
case
char
const
continue
default
do
double
else
enum
extern
float
for
goto
if
int
long
register
return
short
signed
sizeof
static
struct
switch
typedef
union
unsigned
void
volatile
while

Operators in C Language

The programming language C has a wide range of operators, which are symbols used within an expression to define the operations to be carried out when that expression is being evaluated. For: C has operators.

arithmetic: +, -, *, /, %
assignment: =
augmented assignment: +=, -=, *=, /=, %=, &=, |=, ^=, <<=, >>=
bitwise logic: ~, &, |, ^
bitwise shifts: <<, >>
boolean logic: !, &&, ||
conditional evaluation: ? :
equality testing: ==, !=
calling functions: ( )
increment and decrement: ++, --
member selection: ., ->
object size: sizeof
order relations: <, <=, >, >=
reference and dereference: &, *, [ ]
sequencing: ,
subexpression grouping: ( )
type conversion: (typename)

Notes

Although the original sample code will compile on the majority of contemporary compilers when not in strict standard compliance mode, it does not entirely adhere to the specifications of C89 or C99. In actuality, C99 mandates the generation of a diagnostic message.
To accommodate command line inputs, the main function really accepts two arguments, int argc and char *argv[, respectively. Both variants of main must be provided, according to the ISO C standard (section 5.1.2.2.1), which is an unique treatment not given to any other function.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button