Showing posts with label Introduction To C. Show all posts
Showing posts with label Introduction To C. Show all posts

Friday, August 19, 2016

Thursday, May 12, 2016

Thursday, May 5, 2016

Sunday, May 1, 2016

Pointers



Pointers is the heart of c programming . pointers may lead to very fast and efficient programs of they are used correctly ,or may lead very buggy and faulty programs if they are not.

Friday, April 29, 2016

Structure



Structure are used to collect related variables in one place .So we collect some different type variables under a same name to better handle.For Example student information can be gathered in one place.This will simplify any further operation over the collected data,because all information items are treated as a single entity called structure. 

Thursday, April 28, 2016

Break Statement





Break Statement have two condition 

1) When break statement is inside a loop , the loop is immediately terminated and the program go to        the next statement after the loop.

Do .... While Statement




Do... while statement is similar to while statement , except that the condition is checked after executing each loop , which means that the first loop is performed without a check . The computer executes the do..while loop as the following flowchart :

Tuesday, April 26, 2016

String


Strings is a set of several consecutive characters ; each character can be represented in C language by a CHAR data type . This means that string value can be represented by an array of CHAR.

2D Arrays



2D Arrays is suitable to hold tabular information for example it can be used to store 4 students degrees in 6 subjects or to represent (mxn) matrix.

Monday, April 25, 2016

Continue Statement


Image result for continue

For the for loop, continue statement causes the conditional test and increment portions of the loop to execute. For the while and do...while loops,continue statement causes the program control to pass to the conditional tests.

Variable Scope





Global Variables : 

As you notice in the next example x defined one time globally then used in function() and main(). 

Functions


Image result for functions in c

A function is a group of statements that together perform a task. EveryC program has at least one function, which is main(), and all the most trivial programs can define additional functions. You can divide up your code into separate functions.

Arrays (1D)




Image result for Arrays





An array is a container object that holds a fixed number of values of a single type. The length of an array is established when thearray is created. After creation, its length is fixed.


Sunday, April 24, 2016

Switch Case





Example : Implement a C code to take grade form user "A,B,C,D,F" and print "Excellent,Very Good,Good,Pass ,Failed" by using switch case.