Primary Array - C Programming Arrays are structures that hold multiple variables of the same data type. The first element in the array is numbered 0, so the last element is 1 less than the size of the array. An array is also known as a subscripted variable. Before using an array its type and...
Primary The Loop Control Structure - C Programming Sometimes we want some part of our code to be executed more than once. We can either repeat the code in our program or use loops instead. It is obvious that if for example we need to execute some part of code for a hundred times it is not practical...
Primary The Decision Control Structure - C Programming C has three major decision making instructions—the if statement, the if-else statement, and the switch statement. 1. The if Statement C uses the keyword if to implement the decision control instruction. The general form of if statement looks like this: //for single statement if(condition) statement; //for multiple statement...
Primary Expression & Operators Precedence - C Programming Following table summaries the rules for precedence and associativity of all operators, including those that we have not yet discussed. Operators on the same row have the same precedence; rows are in order of decreasing precedence, so, for example, *, /, and % all have the same precedence, which is higher than that...
Primary Introduction - C Programming 1. What is C? * C is a programming language developed at AT & T’s Bell Laboratories of USA in 1972 by Dennis Ritchie. * Any programming Language can be divided in to two categories. * Problem oriented (High level language) * Machine oriented (Low level language) But C is considered as a...
Primary Functions - C Programming 1. What is a Function? A function is combined of a block of code that can be called or used anywhere in the program by calling the name. Body of a function starts with { and ends with } . This is similar to the main function. Example below shows how we can...
Primary Pointers - C Programming 1. What is a Pointer? A pointer is a variable that contains the address of a variable. The main thing is that once you can talk about the address of a variable, you'll then be able to goto that address and retrieve the data stored in it. 2....
Primary Structures - C Programming A structure is a collection of one or more variables, possibly of different types, grouped together under a single name for convenient handling. 1. Declaring a Structure The general form of a structure declaration statement is given below: struct <structure name> { structure element 1; structure element 2; structure...
Primary Files Handling - C Programming 1. File Pointers There are many ways to use files in C. The most straight forward use of files is via a file pointer. FILE *fp; fp is a pointer to a file. The type FILE, is not a basic type, instead it is defined in the header file stdio....