Posts

Showing posts from August, 2019

Macros in c language

Welcome to c programming learning Last post programs outputs 1. 3 2. 5 Now we are going to learn about macros in c programming MACROS Macros are very useful. These are beginning of the program or above the main() function. Let , #define is used to indicate macros  Macros are as follows... 1. Define something with their alias names then we use #define Examples------ #define printf pf Here we can use pf in the place of printf  2. Header files #include<stdio.h> In this we # that means pre processor. In this pre processor is execute first. 3. Conditional In this we use condition loops that is if ,else  With beginning of  #. That is #if, #else 4. If there is defined something previously that can be remove defined that is by using #undefined Examples------  #defined d 15 #undefined d 15  To make undefined of d value Give the output below in comment section #include<studio.h> #define n 15...

Header files in c

Welcome to c programming learning Last post program output is 2 Now we are going to learn about header files. HEADER FILES Header files are very important in c programming language because these header files consists of predefined functions like printf(),scanf(),pow()....etc There we have more header files in that we learn here some which are some what important... 1.stdio.h In this header file consists of address of Function that is printf() and scanf() functions addresses. This means standard input and output. 2.conio.h Next of above header file we use this. In this we have two main functions definition those are clrscr(), getch(),getche() 3.stdlib.h  This is standard library header file. In this we have dynamic memory allocation functions definition ,those are malloc,calloc,realloc,free. And also delay(),rand(),abs(),exit() functions definition are there in this library. 4.math.h This header file consists of all mathematical functions defin...

C keywords

Welcome to c programming learning

C Programming operators

Welcome to c programming learning Last post program output is - 4*8^0+5*8^1=44 Because it is octal number by placing 0 in front of number.  I hope you clear. If there is any doubt please comment... Next topic of c programming is operators  Those are classified as follows 1. Arithmetic operators 2. Logical operators 3. Relational operators 4. Assignment operators 5. Bit wise operators 6.  Incrementoperators 7. Decrement operators 1. Arithmetic operators:-    These are mainly used for doing arithmetic operations. That is addition, subtraction, multiplication , Division. Signs are +,-,/,* Ex:-  a+b;   a-b;  a*b; a/b; // it returns divisible value  Note:    a%b; // it returns remainder 2. Logical operators:-  These are used for logical operations like AND,OR,NOT,XOR...etc. Signs are &&,||,!, .. etc Ex:-a&&b   In this condition both non zero then only true otherwise false ...

Variables in c

Welcome to c programming learning After the data types main thing is to know the variables. That are not to be predefined keywords like return,if .... etc.   Rules to be a variable is-----  1.It may contain letters, numbers, underscore (_). 2.  It must not contain any other sign marks like ;,:,-,+. 3.variable is not to be a keyword. Example:  int a; Here int is data type, a is variable. int _3a; This is valid one. int 3_a; This is also valid Identifier: Identifier is also like as variable. int a; this identifier. Identifier must contain data type followed by variable. Example:  int a; And then next topic is operators..... Connect next post to learn operators... . Thank you 😊 A small task for you all.... That is please comment output of the below program  #include<studio.h>  void main() {   int a=054;   printf("%d",a); }    What is output of this code...........

Data types in c

Welcome to c programming After the function in c programming we have to use curly braces. In that braces we can write statement what ever we want to do.  And next , we have to mind one thing that is  every statement must ends with semicolon (;).     Example------           int i;  Here it is data type and this whole thing is statement In that printf and scanf are the input and output function, which are returning integer values only, these two are predefined functions. And also main part to learn in c programming is data types that is  as follows.... 1.int 2.float 3.double 4.char 1.int:--     int is one the data type in c programming those are indication of integer values only. In that int we have signed integer and unsigned integer. These two integer data type difference making at ranges. In unsigned we don't have negative ranges that means starts from zero. In this long int and short two types are t...

C programming basics

Image
C programming  It is really very easy to learn so move forward..... C programming is a basic programming language, which is procedure oriented language that means this c language is all works on functions only like main function and other predefined or user-defined functions.