Posts

Showing posts with the label Step by step c programming tutorial

Operators in C Language

Image
Observe the given expression y = x + 5. In the above given expression +, = are the operators and x, y, 5 are called operands / argument. Types of operator According to the required argument the operator can be classified into 3 categories: unary operator: require only one argument. example(-5) binary operator: require two argument. example(5+8) ternary operator: require 3 argument. example(?:) According to the purpose operator are again classified into 8 types: Arithmetic operator Unary operator Assignment operator Relational operator Logical operator Bitwise operator Conditional operator(ternary operator) Comma operator Arithmetic operator +,-,*,/,%(mod) are called the arithmetic operator. The +,-,* are same as you learn in mathematical Arithmetic. To more understand take an example. 5 + 3 * 4 In the above given expression, which operator should be evaluates first? As in mathematics you learn the rule of BODMAS,which tells first brackets should be ev

Character Set

The allowed set of characters is called the character set. C character set consist of the following character. Alphabets A-Z , a-z Digits 0 - 9 White Spaces Spaces, tabs, newlines etc. Special Symbols +, -, *, /, %, _,; and many more discussed as needed. Previous Back to C Programming index Next

Steps of learning C Programming

Steps of learning English Alphabets => Words => Sentence => Paragraph Steps of learning C language Character Set => Keywords/ Constant/ Variable => Instruction => Program Previous Back to C Programming index Next

Types of programming languages

Computer programming language can be classfied into two broad categories as follows: Machine oriented Langauge Binary Language/Machine Language Assembly Language Problem Oriented Language Machine Oriented Language In the machine oriented langauage the programm is written in the form in which machine can understand.Machine language are also known as low level language. These language provides the better machine efficiency and fast execution of the program. Machine oriented language again classified into two categories as follows: Binary Language/Machine Language As the name suggests in the binary language only two entity 0/1 (zero/one) are allowed. Where 0 and 1 can be understood in many ways by the computer. As a computer is a digital machine consists of billions of transistors which can be thought like an electronic switch and have two states on/off. The 0 represent the off or false whereas 1 represent the on/true. Assembly Language Becau

Why C language used

Influences C Programming Language The question is very simple before learning the C. That is why we learn C? C is very simple, small and fast. C is a programming language which has only 32 words with them you can build your own programming code. Compare to other programming languages the c program executes very fast. The most popular languages derived from C Programming such as C++, Java, C#(C sharp), PHP, Objective-C, Go lang, Python and many more. So if you want to learn those languages the C provide the basic foundation. The most popular operating systems such as Windows, Unix, Linux build with C. So sometimes people say that C is very old and now it is not used. Then I have to say, it is not the truth. Gaming environments are also written in C. More correctly we can say it has an indirect relationship with C. C programming offers better interaction with hardware. Previous Back to C Programming index Next

Printing in C programming

Image
Printing in C In C for printing purpose, We Use A Function Called printf( ) . A function is a small program used to perform a specific task. The function receives some input known as an argument and produces some output called return value. Functions are always suffixed with parenthesis ( ). Syntax of printf( ) printf("Control String",[List or Variable]); Note: Control string is a sequence of characters which you want to print. ([ ]) square brackets around the list or variable represent that it is optimal. Example Of printf( ) printf("hello"); //Print hello int a=5,b=6; printf("a=%d b=%d",a,b); //print the value of a and b. int a=5,b=6; //Varialbe Declaration printf("%d",a+b); //Print 11. Note: In printf( ) expression can be written .The example is given above. The first program, Say Hello World in C programming /*program to print the "Hello world"*/ #include<stdio.h> int main() { printf(

History of C programming language

History of C C is a general-purpose programming language initially developed by the  Dennis Ritchie  between 1969 to 1973 at AT & T (American Telegraph and telecommunication) Bell Labs. It is named  C  because its features are derived from the earlier language called  B  which is developed by the  Ken Thomson . According to Ken Thomson  B  was the stripped-down version of BCPL (Basic combined programming Language). The origin of c is closely tied up with the Unix operating system development. In 1973 with the addition of  struct  type the c becomes powerful enough that the Unix operating system was designed in C. This was one of the first operating system kernels implemented in a language other than assembly. In 1978, Brian Kernighan and Dennis Ritchie published the first edition of  The C Programming Language. This book, known to C programmers as "K&R", served for many years as an informal specification of the language. The vers

Popular posts from this blog

String in golang

Inline V/S Block Level Element

Floating point Data types in Go lang

Escape Sequence | Formatted Printing | Interview Questions

Sum of two numbers

Operators in C Language| Part-4

Printing in C programming

Arrays in C Language

Program to check a year is leap year or not.

Data types in Java