Block Scope of Variable in C Programming

Block Scope of Variable : Block Scope i.e Local Scope of variable is used to evaluate expression at block level. Variable is said to have local scope / block scope if it is defined within function or local block.In short we can say that local variables are in block scope. Important Points About Block Scope(…)

File Handling / File Operations in C Programming

File Handling / File Operations in C Programming Introduction to File Handling in C Programming Streams Types FILE structure and FILE pointer Types of Files Text Binary Difference between text and binary files Operations on File Open a File File Opening Modes End of File ( feof / EOF ) Close a File Reading and(…)

Introduction : Storage Class in C Programming

Storage Class in C Programming : Every Variable in a program has memory associated with it Memory Requirement of Variables is different for different types of variables In C , Memory is allocated & released at different places Storage Class : Summary Term Definition Scope Region or Part of Program in which Variable is accessible(…)

Storage Classes in C Programming

Introduction Introduction Scope Scope Concept Block Scope / Local Scope Advantages Disadvantages File Scope / Global Scope Advantages Disadvantages Storage Classes Auto Extern Static Local Global Register Interview Questions : What does storage class of variable determines ?

stdio.h functions >> sscanf function in C Programming

sscanf Function : Stdio.h Syntax : int sscanf (const char *buffer, const char *format [, address, ...]); What it actually does ? Data is read from array Pointed to by buffer rather than stdin. Return Type is Integer Return value is nothing but number of fields that were actually assigned a value Live Example: char(…)

Sprintf function : sends formatted output to String

Sprintf function : sends formatted output to String Features : Output is Written into String instead of Displaying it on the Output Devices . Return value is integer ( i.e Number of characters actually placed in array / length of string ) String is terminated by ‘\0′ Main Per pose : Sending Formatted output to(…)

strcmp function >> string.h >> Compare two strings

strcmp function >> string.h >> Compare two strings What strcmp Actually Does ? Function takes two Strings as parameter It returns integer . Syntax : int strcmp ( char *s1, char *s2 ) ; Return Type Return Type Condition -ve Value String1 < String2 +ve Value String1 > String2 0 Value String1 = String2 Live(…)

Let Us C ( Best Selling Book Ever in C) Free Download

LET US C Considered to be one of the best-selling programming books ever written, the eighth edition has now been edited, revised, and updated. A CD-ROM with demos, code, compiler, executables, and MATLAB examples has been added to the book. Simplicity and an easy narration style are the hallmarks of the book, which have made(…)

strcat function >> Concat two Strings in C >> String Operations

strcat function >> Concat two Strings >>  String Operations What strcat Actually does ? Function takes 2 Strings / Character Array as Parameter Appends second string at the end of First String. Parameter Taken 2 Character Arrays / Strings Return Type Character Array / String Syntax : char* strlen ( char * s1, char *(…)

Strlen function in C Programming : Find length of string (String Operation)

strlen() : Finding Length of String While manipulating string or character array in c programming. We need to compute the length of the string , C library provides different string handling functions. In order to compute length of the string strlen() function is used. Syntax of the strlen() function : int strlen(char * str); Explanation(…)