What is Command Line Argument in C

COMMAND LINE ARGUMENT:- Command line argument in C is a mechanism by which a program takes input during runtime. The main function takes two parameters in a command line argument such as Argument Counter:- It counts the number of argument on the command line. Argument Vector:- Is a pointer array which points to each argument… Continue reading What is Command Line Argument in C

Structure and Union in C

Structure and Union:- Structure:- Structure is a mechanism which groups different data member to form a record. A structure is suitable for creating a database memory link and link list and creating bit-field. Basically, structure is used to defines as a record. Syntax:- struct [structure name] { member definition; member definition; … member definition; };… Continue reading Structure and Union in C

Preprocessor Directives in C

Preprocessor Directives in C:- The c preprocessor is known as CPP is a macro processor that is used automatic call by the compiler to transform your program before compilation. Macro is a symbolic name of expression. Different type of pre-processor directive:- i)macro expansion: #define, #undef ii)File inclusion directive: #include iii)Conditional directive: #if,#else,#endif,#elif, #ifdef, #ifndef iv)Miscellaneous directive: #pragma All… Continue reading Preprocessor Directives in C

Storage Class in C

Storage Class in C:- Every c program has a storage class and a scope. The storage class is a data structure that decides the scope, storage default initial value, and life of variable function. Different types of scope and rules present in c:- Program scope File scope Function scope Block scope Program scope:- If a… Continue reading Storage Class in C

Function in C

Function in C:- A function is a set of statements that are encapsulated together to perform a particular task. There are basically 3 types of function:- User-defined function Standard Library function System Calls User-defined function:- When the library function is not sufficient enough to solve the current problem then immediately the developer writes the code… Continue reading Function in C

Dynamic Memory Allocation

Dynamic Memory Allocation:- Every program allocates memory during the runtime and load time, but how much memory will be allocated during the runtime is called dynamic memory allocation. If the size is decided during the compile time only that called static memory allocation. Entire 4GB memory is split into two parts such as lower 3GB… Continue reading Dynamic Memory Allocation

String in C

String in C:- A string in C is a character array terminated with a null character. All the string are character array but all the character array is not a string. main() {             char p[]={‘a’,’b’,’c’,’d’};             char q[]={‘a’,’b’,’c’,’d’,’\0’}; } Here p is a character array and q is a string. Anything is written within… Continue reading String in C

Pointer in C

Pointer in C:- A pointer in C is a variable which refers only address. (address is a location in memory). Pointer is 4byte because an address is a 4 byte long. Pointer cannot refers any address beyond 4GB of memory in GCC compiler. APPLICATION OF THE POINTER:- It is used for dynamic memory allocation and… Continue reading Pointer in C

Array in C

Array in C:- Array in C  is a variable that can hold more than one similar type of element. It is sequential in nature. Array index starts from zero which is known as the lower boundary of an array. Array upper boundary is (Array size-1). To access each element of array called traversing of the… Continue reading Array in C

Control Structure in C

CONTROL STRUCTURE:- Hanging if is not allowed in C language. If a statement is used for checking range and yes/no problem. else is the optional part of the if. Execution of the switch case starts from the match case. Use break to prevent the falling of control from one case to another case. If none… Continue reading Control Structure in C

Operator in C

Operator in C:- Operator in C :- 1) Precedence and associativity of an operator only implemented if it is represented in INFIX notation. Precedence decides which operation will be performed first. Associativity decides the order of evaluation ( left to right or right to left) if more than one operator enjoy the same precedence. The… Continue reading Operator in C

Structure Of  C Program

STRUCTURE OF C PROGRAM:- In this post, we will learn about the Structure Of  C Program. Following are the basic Structure Of  C Program Include header file section Global declaration section main() { Declaration statement Executable statement } User-defined functions { Statements } Include Header File Section C program always depends upon some header files… Continue reading Structure Of  C Program

Interesting facts about C Program

Interesting facts about C Program:- The Interesting facts about C Program are When you purchase a computer directly from the manufacturer, is like a dead body, and one has to give life to it, by feeding something ( software) to enable it to perform the desired function, that specific software is designed in C language. If you… Continue reading Interesting facts about C Program