Index-1              Index-2              Home Page
Showing posts with label c programming. Show all posts
Showing posts with label c programming. Show all posts

C Tokens, Keywords, Identifiers, Constants, Variables, Data Types

In this tutorial, you will learn
  • What is a Character set?
  • Token
  • Keywords and Identifiers
  • What is a Variable?
  • Integer data type
  • Floating point data type
  • Constants

What is a Character set?

Like every other language 'C' also has its own character set. A program is a set of instructions that when executed, generate an output. The data that is processed by a program consists of various characters and symbols. The output generated is also a combination of characters and symbols.
A character set in 'C' is divided into,
  • Letters
  • Numbers
  • Special characters
  • White spaces (blank spaces)
A compiler always ignores the use ofcharacters, but it is widely used for formatting the data. Following is the character set in 'C' programming:
  1. Letters
    • Uppercase characters (A-Z)
    • Lowercase characters (a-z)
  2. Numbers
    • All the digits from 0 to 9
  3. White spaces
    • Blank space
    • New line
    • Carriage return
    • Horizontal tab
  4. Special characters
    • Special characters in 'C' are shown in the given table,
, (comma) { (opening curly bracket)
. (period) } (closing curly bracket)
; (semi-colon) [ (left bracket)
: (colon) ] (right bracket)
? (question mark) ( (opening left parenthesis)
' (apostrophe) ) (closing right parenthesis)
" (double quotation mark) & (ampersand)
! (exclamation mark) ^ (caret)
|(vertical bar) + (addition)
/ (forward slash) - (subtraction)
\ (backward slash) * (multiplication)
~ (tilde) / (division)
_ (underscore) > (greater than or closing angle bracket)
$ (dollar sign) < (less than or opening angle bracket)
% (percentage sign) # (hash sign)

Token

A token is the smallest unit in a 'C' program. A token is divided into six different types as follows,


Tokens in C

Keywords and Identifiers

In 'C' every word can be either a keyword or an identifier.
Keywords have fixed meanings, and the meaning cannot be changed. They act as a building block of a 'C' program. There are total 32 keywords in 'C'. Keywords are written in lowercase letters.
Following table represents the keywords in 'C',
auto double int struct
break else long switch
case enum register typedef
char extern return union
const short float unsigned
continue for signed void
default goto sizeof volatile
do if static while
An identifier is nothing but a name assigned to an element in a program. Example, name of a variable, function, etc. Identifiers are the user-defined names consisting of 'C' standard character set. As the name says, identifiers are used to identify a particular element in a program. Each identifier must have a unique name. Following rules must be followed for identifiers:
  1. The first character must always be an alphabet or an underscore.
  2. It should be formed using only letters, numbers, or underscore.
  3. A keyword cannot be used as an identifier.
  4. It should not contain any whitespace character.
  5. The name must be meaningful.

What is a Variable?

A variable is an identifier which is used to store some value. Constants can never change at the time of execution. Variables can change during the execution of a program and update the value stored inside it.
A single variable can be used at multiple locations in a program. A variable name must be meaningful. It should represent the purpose of the variable.
Example: Height, age, are the meaningful variables that represent the purpose it is being used for. Height variable can be used to store a height value. Age variable can be used to store the age of a person
A variable must be declared first before it is used somewhere inside the program. A variable name is formed using characters, digits and an underscore.
Following are the rules that must be followed while creating a variable:
  1. A variable name should consist of only characters, digits and an underscore.
  2. A variable name should not begin with a number.
  3. A variable name should not consist of whitespace.
  4. A variable name should not consist of a keyword.
  5. 'C' is a case sensitive language that means a variable named 'age' and 'AGE' are different.
Following are the examples of valid variable names in a 'C' program:
height or HEIGHT
_height
_height1
My_name
Following are the examples of invalid variable names in a 'C' program:
1height
Hei$ght
My name
For example, we declare an integer variable my_variable and assign it the value 48:
int my_variable;
my_variable = 48;
By the way, we can both declare and initialize (assign an initial value) a variable in a single statement:
int my_variable = 48;

Data types

'C' provides various data types to make it easy for a programmer to select a suitable data type as per the requirements of an application. Following are the three data types:
  1. Primitive data types
  2. Derived data types
  3. User-defined data types
There are five primary fundamental data types,
  1. int for integer data
  2. char for character data
  3. float for floating point numbers
  4. double for double precision floating point numbers
  5. void
Array, functions, pointers, structures are derived data types. 'C' language provides more extended versions of the above mentioned primary data types. Each data type differs from one another in size and range. Following table displays the size and range of each data type.
Data type Size in bytes Range
Char or signed char 1 -128 to 127
Unsigned char 1 0 to 255
int or signed int 2 -32768 to 32767
Unsigned int 2 0 to 65535
Short int or Unsigned short int 2 0 to 255
Signed short int 2 -128 to 127
Long int or Signed long int 4 -2147483648 to 2147483647
Unsigned long int 4 0 to 4294967295
float 4 3.4E-38 to 3.4E+38
double 8 1.7E-308 to 1.7E+308
Long double 10 3.4E-4932 to 1.1E+4932
Note: In C, there is no Boolean data type.

Integer data type

Integer is nothing but a whole number. The range for an integer data type varies from machine to machine. The standard range for an integer data type is -32768 to 32767.
An integer typically is of 2 bytes which means it consumes a total of 16 bits in memory. A single integer value takes 2 bytes of memory. An integer data type is further divided into other data types such as short int, int, and long int.
Each data type differs in range even though it belongs to the integer data type family. The size may not change for each data type of integer family.
The short int is mostly used for storing small numbers, int is used for storing averagely sized integer values, and long int is used for storing large integer values.
Whenever we want to use an integer data type, we have place int before the identifier such as,
int age;
Here, age is a variable of an integer data type which can be used to store integer values.

Floating point data type

Like integers, in 'C' program we can also make use of floating point data types. The 'float' keyword is used to represent the floating point data type. It can hold a floating point value which means a number is having a fraction and a decimal part. A floating point value is a real number that contains a decimal point. Integer data type doesn't store the decimal part hence we can use floats to store decimal part of a value.
Generally, a float can hold up to 6 precision values. If the float is not sufficient, then we can make use of other data types that can hold large floating point values. The data type double and long double are used to store real numbers with precision up to 14 and 80 bits respectively.
While using a floating point number a keyword float/double/long double must be placed before an identifier. The valid examples are,
float division;
double BankBalance;

Character data type

Character data types are used to store a single character value enclosed in single quotes.
A character data type takes up-to 1 byte of memory space.
Example,
Char letter;

Void data type

A void data type doesn't contain or return any value. It is mostly used for defining functions in 'C'.
Example,
void displayData()
Type declaration of a variable
int main() {
int x, y;
float salary = 13.48;
char letter = 'K';
x = 25;
y = 34;
int z = x+y;
printf("%d \n", z);
printf("%f \n", salary);
printf("%c \n", letter);
return 0;}
Output:
59
13.480000
K
We can declare multiple variables with the same data type on a single line by separating them with a comma. Also, notice the use of format specifiers in printf output function float (%f) and char (%c) and int (%d).

Constants

Constants are the fixed values that never change during the execution of a program. Following are the various types of constants:

Integer constants

An integer constant is nothing but a value consisting of digits or numbers. These values never change during the execution of a program. Integer constants can be octal, decimal and hexadecimal.
  1. Decimal constant contains digits from 0-9 such as,
Example, 111, 1234
Above are the valid decimal constants.
  1. Octal constant contains digits from 0-7, and these types of constants are always preceded by 0.
Example, 012, 065
Above are the valid decimal constants.
  1. Hexadecimal constant contains a digit from 0-9 as well as characters from A-F. Hexadecimal constants are always preceded by 0X.
Example, 0X2, 0Xbcd
Above are the valid hexadecimal constants.
The octal and hexadecimal integer constants are very rarely used in programming with 'C'.

Character constants

A character constant contains only a single character enclosed within a single quote (''). We can also represent character constant by providing ASCII value of it.
Example, 'A', '9'
Above are the examples of valid character constants.

String constants

A string constant contains a sequence of characters enclosed within double quotes ("").
Example, "Hello", "Programming"
These are the examples of valid string constants.

Real Constants

Like integer constants that always contains an integer value. 'C' also provides real constants that contain a decimal point or a fraction value. The real constants are also called as floating point constants. The real constant contains a decimal point and a fractional value.
Example, 202.15, 300.00
These are the valid real constants in 'C'.
A real constant can also be written as,
Mantissa e Exponent
For example, to declare a value that does not change like the classic circle constant PI, there are two ways to declare this constant
  1. By using the const keyword in a variable declaration which will reserve a storage memory
  2.  #include <stdio.h>
    int main() {
    const double PI = 3.14;
    printf("%f", PI);
    //PI++; // This will generate an error as constants cannot be changed
    return 0;}
    
  3. By using the #define pre-processor directive which doesn't use memory for storage and without putting a semicolon character at the end of that statement
  4. #include <stdio.h>
    #define PI 3.14
    int main() {
    printf("%f", PI);
    return 0;}
    
Summary
  • A constant is a value that doesn't change throughout the execution of a program.
  • A token is the smallest unit in a program.
  • A keyword is reserved words by language.
  • There are total 32 keywords.
  • An identifier is used to identify elements of a program.
  • A variable is an identifier which is used to store a value.
  • There are four commonly used data types such as int, float, char and a void.
  • Each data type differs in size and range from one another.

How to write Comments in C Programming

What Is Comment In C Language?

A comment is an explanation or description of the source code of the program. It helps a developer explain logic of the code and improves program readability. At run-time, a comment is ignored by the compiler.
There are two types of comments in C:
1) A comment that starts with a slash asterisk /* and finishes with an asterisk slash */ and you can place it anywhere in your code, on the same line or several lines.
2) Single-line Comments which uses a double slash // dedicated to comment single lines

Example Single Line Comment

// single line comment example
Here is an example of comments type
// C program to demo 
// Single Line comment 
#include <stdio.h> 
int main(void) 
{ 
  
 // This is a single line comment 
 printf("Guru99"); 
 return 0;  // return zero
}

Example Multi Line Comment

/* Sample Multiline Comment
Line 1
Line 2
….
…
*/
Example Multi Line Comment
#include <stdio.h>
int main() {
/* in main function
I can write my principal code
And this in several comments line */
int x = 42; //x is a integer variable
printf("%d", x);
return 0;} 

Why do you need comments?

A good programmer who writes codes understood by a human is better than a programmer who generates codes understood only by the machine.
So, it is highly recommended to insert comments to your code because it is good programming practice. Comments do not affect a program because the compiler ignores them.
Comments help the developer understand the logic/algorithm of the code if he revisits it after a long time.


First C Program

Your First C Program

Here, is a Hello World program in C
#include<stdio.h> //Pre-processor directive
void main()  //main function declaration
{
printf("Hello World"); //to output the string on a display
getch ();  //terminating function
}
Here is the code explanation:

Pre-processor directive

#include is a pre-processor directive in 'C.'
#include <stdio.h>, stdio is the library where the function printf is defined. printf is used for generating output. Before using this function, we have to first include the required file, also known as a header file (.h).
You can also create your own functions, group them in header files and declare them at the top of the program to use them. To include a file in a program, use pre-processor directive
#include <file-name>.h
File-name is the name of a file in which the functions are stored. Pre-processor directives are always placed at the beginning of the program.

The main function

The main function is a part of every 'C' program. We can represent the main function in various forms, such as:
  • main()
  • int main()
  • void main()
  • main(void)
  • void main(void)
  • int main(void)
The empty parentheses indicate that this function does not take any argument, value or a parameter. You can also represent this explicitly by placing the keyword void inside the parentheses. The keyword void means the function does not return any value, in this case, the last statement is always getch ().
#include<stdio.h> //Pre-processor directive
int main()  //main function declaration
{
printf("Hello World"); //to output the string on a display
return 0;  //terminating function
}
In the above example, the keyword int means the function will return an integer value. In this case, the last statement should always return 0.

The source code

After the main function has been declared, we have to specify the opening and closing parentheses. Curly brackets { }, indicate the starting and end of a program. These brackets must be always put after the main function. All the program code is written inside these brackets, such as declarative and executable part.
The printf function generates the output by passing the text "Hello World!"
The semicolon ; determines the end of the statement. In C, each statement must end with a semicolon.
So we have successfully installed the compiler and now can begin working in 'C.' We will write a simple program that will say hello to us. Let's start.

How to run C Program

Step 1) Create a new Project
Step 2) In the pop-up,
  1. Select File
  2. Choose the "C/C++ Source"
  3. Click "Go."
Step 3) Continue, by clicking on "Next."
Step 4) To create the new file ,select a "C" file then click on "Next" button to continue.
Step 5) Set the file path by clicking the "..." button, the explorer window permits to create the C file.
Step 6) Select the path of your new C File then its name which has .c extension and save it.
Step 7) Finally, to confirm the C file creation click "Finish."
Step 8) Enter the code, save it and compile it by clicking on the "Build & Run "button.
Here is the result:
 Hello, World! 

Summary

  • The main function is a mandatory part of every 'C' program.
  • To use the functionality of a header file, we have to include the file at the beginning of our program.
  • Every 'C' program follows a basic structure.

What is C Programming Language?

What is C programming?

C is a general-purpose programming language that is extremely popular, simple and flexible. It is machine-independent, structured programming language which is used extensively in various applications.
C was the basics language to write everything from operating systems (Windows and many others) to complex programs like the Oracle database, Git, Python interpreter and more.
It is said that 'C' is a god's programming language. One can say, C is a base for the programming. If you know 'C,' you can easily grasp the knowledge of the other programming languages that uses the concept of 'C'
It is essential to have a background in computer memory mechanisms because it is an important aspect when dealing with the C programming language.

IEEE-the best 10 top programming language in 2018

Operator in C Programming Language

An operator is a symbol which operates on a value or a variable. For example: + is an operator to perform addition.
C has wide range of operators to perform various operations.

C Arithmetic Operators

An arithmetic operator performs mathematical operations such as addition, subtraction and multiplication on numerical values (constants and variables).
Operator Meaning of Operator
+ addition or unary plus
- subtraction or unary minus
* multiplication
/ division
% remainder after division( modulo division)

Example 1: Arithmetic Operators

// C Program to demonstrate the working of arithmetic operators
#include <stdio.h>
int main()
{
    int a = 9,b = 4, c;
    
    c = a+b;
    printf("a+b = %d \n",c);

    c = a-b;
    printf("a-b = %d \n",c);
    
    c = a*b;
    printf("a*b = %d \n",c);
    
    c=a/b;
    printf("a/b = %d \n",c);
    
    c=a%b;
    printf("Remainder when a divided by b = %d \n",c);
    
    return 0;
}
Output
a+b = 13
a-b = 5
a*b = 36
a/b = 2
Remainder when a divided by b=1
The operators +, - and * computes addition, subtraction and multiplication respectively as you might have expected.
In normal calculation, 9/4 = 2.25. However, the output is 2 in the program.
It is because both variables a and b are integers. Hence, the output is also an integer. The compiler neglects the term after decimal point and shows answer 2 instead of 2.25.
The modulo operator % computes the remainder. When a = 9 is divided by b = 4, the remainder is 1. The % operator can only be used with integers.
Suppose a = 5.0, b = 2.0, c = 5 and d = 2. Then in C programming,

a/b = 2.5  // Because both operands are floating-point variables
a/d = 2.5  // Because one operand is floating-point variable
c/b = 2.5  // Because one operand is floating-point variable
c/d = 2     // Because both operands are integers

Increment and decrement operators

C programming has two operators increment ++ and decrement -- to change the value of an operand (constant or variable) by 1.
Increment ++ increases the value by 1 whereas decrement -- decreases the value by 1. These two operators are unary operators, meaning they only operate on a single operand.

Example 2: Increment and Decrement Operators

// C Program to demonstrate the working of increment and decrement operators
#include <stdio.h>
int main()
{
    int a = 10, b = 100;
    float c = 10.5, d = 100.5;

    printf("++a = %d \n", ++a);

    printf("--b = %d \n", --b);

    printf("++c = %f \n", ++c);

    printf("--d = %f \n", --d);

    return 0;
}
Output
++a = 11
--b = 99
++c = 11.500000
++d = 99.500000
Here, the operators ++ and -- are used as prefix. These two operators can also be used as postfix like a++ and a--. Visit this page to learn more on how increment and decrement operators work when used as postfix.

C Assignment Operators

An assignment operator is used for assigning a value to a variable. The most common assignment operator is =
Operator Example Same as
= a = b a = b
+= a += b a = a+b
-= a -= b a = a-b
*= a *= b a = a*b
/= a /= b a = a/b
%= a %= b a = a%b

Example 3: Assignment Operators

// C Program to demonstrate the working of assignment operators
#include <stdio.h>
int main()
{
    int a = 5, c;

    c = a;
    printf("c = %d \n", c);

    c += a; // c = c+a
    printf("c = %d \n", c);

    c -= a; // c = c-a
    printf("c = %d \n", c);

    c *= a; // c = c*a
    printf("c = %d \n", c);

    c /= a; // c = c/a
    printf("c = %d \n", c);

    c %= a; // c = c%a
    printf("c = %d \n", c);

    return 0;
}
Output
c = 5 
c = 10 
c = 5 
c = 25 
c = 5 
c = 0

C Relational Operators

A relational operator checks the relationship between two operands. If the relation is true, it returns 1; if the relation is false, it returns value 0.
Relational operators are used in decision making and loops.
Operator Meaning of Operator Example
== Equal to 5 == 3 returns 0
> Greater than 5 > 3 returns 1
< Less than 5 < 3 returns 0
!= Not equal to 5 != 3 returns 1
>= Greater than or equal to 5 >= 3 returns 1
<= Less than or equal to 5 <= 3 return 0

Example 4: Relational Operators

// C Program to demonstrate the working of arithmetic operators
#include <stdio.h>
int main()
{
    int a = 5, b = 5, c = 10;

    printf("%d == %d = %d \n", a, b, a == b); // true
    printf("%d == %d = %d \n", a, c, a == c); // false

    printf("%d > %d = %d \n", a, b, a > b); //false
    printf("%d > %d = %d \n", a, c, a > c); //false


    printf("%d < %d = %d \n", a, b, a < b); //false
    printf("%d < %d = %d \n", a, c, a < c); //true


    printf("%d != %d = %d \n", a, b, a != b); //false
    printf("%d != %d = %d \n", a, c, a != c); //true


    printf("%d >= %d = %d \n", a, b, a >= b); //true
    printf("%d >= %d = %d \n", a, c, a >= c); //false


    printf("%d <= %d = %d \n", a, b, a <= b); //true
    printf("%d <= %d = %d \n", a, c, a <= c); //true

    return 0;

}
Output
5 == 5 = 1
5 == 10 = 0
5 > 5 = 0
5 > 10 = 0
5 < 5 = 0
5 < 10 = 1
5 != 5 = 0
5 != 10 = 1
5 >= 5 = 1
5 >= 10 = 0
5 <= 5 = 1
5 <= 10 = 1 

C Logical Operators

An expression containing logical operator returns either 0 or 1 depending upon whether expression results true or false. Logical operators are commonly used in decision making in C programming.
Operator Meaning of Operator Example
&& Logial AND. True only if all operands are true  If c = 5 and d = 2 then, expression ((c == 5) && (d > 5)) equals to 0.
|| Logical OR. True only if either one operand is true If c = 5 and d = 2 then, expression ((c == 5) || (d > 5)) equals to 1.
! Logical NOT. True only if the operand is 0 If c = 5 then, expression ! (c == 5) equals to 0.

Example #5: Logical Operators

// C Program to demonstrate the working of logical operators

#include <stdio.h>
int main()
{
    int a = 5, b = 5, c = 10, result;

    result = (a == b) && (c > b);
    printf("(a == b) && (c > b) equals to %d \n", result);

    result = (a == b) && (c < b);
    printf("(a == b) && (c < b) equals to %d \n", result);

    result = (a == b) || (c < b);
    printf("(a == b) || (c < b) equals to %d \n", result);

    result = (a != b) || (c < b);
    printf("(a != b) || (c < b) equals to %d \n", result);

    result = !(a != b);
    printf("!(a == b) equals to %d \n", result);

    result = !(a == b);
    printf("!(a == b) equals to %d \n", result);

    return 0;
}
Output
(a == b) && (c > b) equals to 1 
(a == b) && (c < b) equals to 0 
(a == b) || (c < b) equals to 1 
(a != b) || (c < b) equals to 0 
!(a != b) equals to 1 
!(a == b) equals to 0 
Explanation of logical operator program
  • (a == b) && (c > 5) evaluates to 1 because both operands (a == b) and (c > b) is 1 (true).
  • (a == b) && (c < b) evaluates to 0 because operand (c < b) is 0 (false).
  • (a == b) || (c < b) evaluates to 1 because (a = b) is 1 (true).
  • (a != b) || (c < b) evaluates to 0 because both operand (a != b) and (c < b) are 0 (false).
  • !(a != b) evaluates to 1 because operand (a != b) is 0 (false). Hence, !(a != b) is 1 (true).
  • !(a == b) evaluates to 0 because (a == b) is 1 (true). Hence, !(a == b) is 0 (false).

Bitwise Operators

During computation, mathematical operations like: addition, subtraction, addition and division are converted to bit-level which makes processing faster and saves power.
Bitwise operators are used in C programming to perform bit-level operations.
Operators Meaning of operators
& Bitwise AND
| Bitwise OR
^ Bitwise exclusive OR
~ Bitwise complement
<< Shift left
>> Shift right
Visit bitwise operator in C to learn more.

Other Operators


Comma Operator

Comma operators are used to link related expressions together. For example:
int a, c = 5, d;

The sizeof operator

The sizeof is an unary operator which returns the size of data (constant, variables, array, structure etc).

Example 6: sizeof Operator

#include <stdio.h>
int main()
{
    int a, e[10];
    float b;
    double c;
    char d;
    printf("Size of int=%lu bytes\n",sizeof(a));
    printf("Size of float=%lu bytes\n",sizeof(b));
    printf("Size of double=%lu bytes\n",sizeof(c));
    printf("Size of char=%lu byte\n",sizeof(d));
    printf("Size of integer type array having 10 elements = %lu bytes\n", sizeof(e));
    return 0;
}
Output
Size of int = 4 bytes
Size of float = 4 bytes
Size of double = 8 bytes
Size of char = 1 byte
Size of integer type array having 10 elements = 40 bytes

 C Ternary Operator (?:)

Ternary operator is a conditional operator that works on 3 operands.

Conditional Operator Syntax

conditionalExpression ? expression1 : expression2
The conditional operator works as follows:
  • The first expression conditionalExpression is evaluated first. This expression evaluates to 1 if it's true and evaluates to 0 if it's false.
  • If conditionalExpression is true, expression1 is evaluated.
  • If conditionalExpression is false, expression2 is evaluated.

Example 7: C conditional Operator

#include <stdio.h>
int main(){
   char February;
   int days;
   printf("If this year is leap year, enter 1. If not enter any integer: ");
   scanf("%c",&February);

   // If test condition (February == 'l') is true, days equal to 29.
   // If test condition (February =='l') is false, days equal to 28. 
   days = (February == '1') ? 29 : 28;

   printf("Number of days in February = %d",days);
   return 0;
}
Output
If this year is leap year, enter 1. If not enter any integer: 1
Number of days in February = 29

C Programming Source Code : Index-1


Index-1     Index-2    


1.    C program to calculate any kindof equationView |
-------------------------------------------------------------------
2.    C program to count vowel,consonant, arithmetic operator, special character, word and sentence from amultiple line string  View |
----------------------------------------------------------------------------------------------------------------------
3.    C program to count vowel,consonant, arithmetic operator, special character, word and sentenceView | 
----------------------------------------------------------------------------------------------------------------------
4.    C program to read a string from a file and write it to the another file | View |
------------------------------------------------------------------------------------------------------------
5.    C program to read a string from a file | View |
------------------------------------------------------------------------------------------------------------
6.    C program to write a string into a fileView |
------------------------------------------------------------------------------------------------------------
7.    C program to count word and sentenceView | 
------------------------------------------------------------------------------------------------------------
8.    C program to count Vowel and ConsonantView |
------------------------------------------------------------------------------------------------------------
9.    C program for String Array sorting using bubble sort algorithmView | 
------------------------------------------------------------------------------------------------------------
10. C program for Bubble Sort using user defined function | View |
------------------------------------------------------------------------------------------------------------
11. C program for Bubble Sort with structView | 
------------------------------------------------------------------------------------------------------------
12. C program for Binary Search implementationView |
------------------------------------------------------------------------------------------------------------
13. Count number of students above,below and average students Using "C Programming"View |
------------------------------------------------------------------------------------------------------------
14. Constants usage in "C Programming"View |
-----------------------------------------------------------
15. A demo "C Program" which represent the ATM transactionView |
-------------------------------------------------------------------------------------
16. Descending an Array using "C Programming"View | 
---------------------------------------------------------------------
17. Addition of two numbers without using arithmetic operator as like "+" using "C Programming"  | View | 
---------------------------------------------------------------------------------------------------------
18. Add two Matrices and store the result into another Matrices using "C Programming" | View |
----------------------------------------------------------------------------------------------------------
19. Use C Pointer with array to perform a sumView | 
-----------------------------------------------------------------
20. Add numbers using command line arguments (CLA) using "C Programming"View |
-----------------------------------------------------------------------------------------------------------
21. Insertion sort using struct in "C Programming"View |
-----------------------------------------------------------------------------------------------------------
22. Find address of char, string, integer using "C Programming"View |
-----------------------------------------------------------------------------------------------------------
23. Subtraction of Two Matrices using "C Programming"View |
-----------------------------------------------------------------------------------------------------------
24. Swapping of two Values using Functions in "C Programming"View | 
-----------------------------------------------------------------------------------------------------------
25. Delete Characters from a given position in a given string using "C Programming"View |
-----------------------------------------------------------------------------------------------------------
26. Count the total number of Consonants in a String using "C Programming"View |   
-----------------------------------------------------------------------------------------------------------
27. Tree sort- string array in "C Programming"View |
------------------------------------------------------------------------------------------
28. Demonstrate the use of Strlen() Function using C ProgrammingView |  
------------------------------------------------------------------------------------------
29. C program to concatenate two stringsView | 
------------------------------------------------------------------------------------------
30. C program to count the number of vowelsView | 
------------------------------------------------------------------------------------------
31. C program to create double dimension array of 2x3 matrix and display its ElementsView |
-------------------------------------------------------------------------------------------------
32. Find out Bigger number using Ternary Operator in "C Programming"View |  
-------------------------------------------------------------------------------------------------
33. Find out Quadratic Equation (d=b2-4ac) using "C Programming"View | 
-------------------------------------------------------------------------------------------------
34. C Program for total bill calculation with discount using Ternary Operators View |   
-------------------------------------------------------------------------------------------------
35. C Program to write salary calculationView | 
-------------------------------------------------------------------------------------------------
36. Write a C Program to find the given year is leap year or notView | 
-------------------------------------------------------------------------------------------------
37. C Program to find the size of a declared variableView |
-------------------------------------------------------------------------------------------------
38. C Program to find a stringView | 
-------------------------------------------------------------------------------------------------
39. C Program to find the length of a given stringView | 
-------------------------------------------------------------------------------------------------
40. C Program to reverse wordsView | 
-------------------------------------------------------------------------------------------------
41. C Program to Swap NumbersView |
---------------------------------------------------------------------------------------------------
42. C Program to check whether a given input is Armstrong number or notView |
---------------------------------------------------------------------------------------------------
43. Permutations of a given string using C ProgrammingView | 
---------------------------------------------------------------------------------------------------
44. Calculate factorial of a number using C Programming View |
---------------------------------------------------------------------------------------------------
45. Find roots of a quadratic equation using C ProgrammingView |
---------------------------------------------------------------------------------------------------
46. C Program to represent simpson methodView |
---------------------------------------------------------------------------------------------------
47. C Program to print a triangleView |
---------------------------------------------------------------------------------------------------
48. Example of XOR list using C ProgrammingView | 
---------------------------------------------------------------------------------------------------
49. C Program to Find the GCD and LCM of Two IntegersView | 
---------------------------------------------------------------------------------------------------
50. Find factorial of a given number using the recursive function method in C Programming |View |
---------------------------------------------------------------------------------------------------
51. Write a C Program to sum of all elements from a two dimensional (2D) arrayView |
-----------------------------------------------------------------------------------------------------------
52. Print the multiplication table using C ProgrammingView | 
----------------------------------------------------------------------------
53. Sum of 1st 10 Prime Numbers using C Programming  | View | 
------------------------------------------------------------------------------------------
54. Sum of each consequent 5 even numbers using C ProgrammingView |
------------------------------------------------------------------------------------------
55. Nesting of for loops for Pyramid Drawing using C ProgrammingView |
------------------------------------------------------------------------------------------
56. C Program to find or manipulate EVEN NUMBERView | 
------------------------------------------------------------------------------------------
57. Difference between while & do while loops in C ProgrammingView |
------------------------------------------------------------------------------------------
58. Special Operator in C ProgrammingView |
------------------------------------------------------------------------------------------
59. Relational Operators in C ProgrammingView |
------------------------------------------------------------------------------------------
60. File Programming in CView | 
------------------------------------------------------------------------------------------
61. String Programming in CView | 
------------------------------------------------------------------------------------------
62. Do While Example in CView |
------------------------------------------------------------------------------------------
63. While loop example in C |View |
------------------------------------------------------------------------------------------
64. For Loop example in CView | 
------------------------------------------------------------------------------------------
65. How to use Conditional Operator in C ProgrammingView |
------------------------------------------------------------------------------------------
66. Logical Operator in C ProgrammingView |
------------------------------------------------------------------------------------------
67. Break Keyword in C ProgrammingView |
------------------------------------------------------------------------------------------
68. Looping technique in C ProgrammingView |
------------------------------------------------------------------------------------------
69. How to became expert in Array Programming in C LanguageView |
------------------------------------------------------------------------------------------
70. The power of Pointer Programming in C LanguageView |
------------------------------------------------------------------------------------------
71. Arithmetic Program using C LanguageView |
------------------------------------------------------------------------------------------
72. Arithmetic Operation in C using Pointer VariableView |
------------------------------------------------------------------------------------------
73. Pointer Array in C Programming LanguageView | 
------------------------------------------------------------------------------------------
74. Recursive Function in C Programming LanguageView | 
------------------------------------------------------------------------------------------
75. String Programming in C Programming LanguageView | 
------------------------------------------------------------------------------------------
76. Function Programming  in C to generate Fibonacci seriesView |
------------------------------------------------------------------------------------------
77. Function Programming in C to find all numbers which are divisible by 9 | View |
-----------------------------------------------------------------------------------------------------
78. Function Programming to find the Area of a Circle in C LanguageView |
-----------------------------------------------------------------------------------------------------
79. Function Programming to find number which is Divisible by 5 in C LanguageView | 
-----------------------------------------------------------------------------------------------------
80. Function Programming to Print an Array in C LanguageView |
--------------------------------------------------------------------------------------------
81. Function Programming : Array programming in CView | 
--------------------------------------------------------------------------------------------
82. Evaluate below equation (problem-83/Line 83) using c function.
83. sum=x + x^2  +  x^3  + ...........+ x ^ n. |View |
-----------------------------------------------------------------------------------------------------------
84. Function Programming to find Even and Odd Number find using C LanguageView |
-----------------------------------------------------------------------------------------------------------
85. Function Programming to find a Strange Number in C Language |View|
---------------------------------------------------------------------------------------------------
86. Function Programming to check Perfect Number in C LanguageView |
---------------------------------------------------------------------------------------------------
87. Function Programming to Check Prime Number in C LanguageView | 
---------------------------------------------------------------------------------------------------
88. Solve an equation of a line using C ProgrammingView |
---------------------------------------------------------------------------------------------------
89. Find the 1st three (3) Armstrong Number using C Programming |View | 
---------------------------------------------------------------------------------------------------
90. C Program to built the patternView | 
---------------------------------------------------------------------------------------------------
91. Print 1st 30 Perfect Numbers starting from 0 and calculate the sum of that numbers using  C Programming Language |View|
------------------------------------------------------------------------------------------------------------
92. Check whether the sum of all printed prime numbers are equal to the given input or not?View |
--------------------------------------------------------------------------------------------------------------
93. Write a program to find the Maximum Strange Numbers Between 1 and 100000View |
--------------------------------------------------------------------------------------------------------------
94. Find the maximum term of Fibonacci sequence whose values do not exceed four millionView |
--------------------------------------------------------------------------------------------------------------
95. Print at least 5 possible valuesView |
--------------------------------------------------------------------------------------------------------------
96. Print and Sum of all the Multiples of 3 or 5 up to 999View |
--------------------------------------------------------------------------------------------------------------
97. What is the value of the first triangle number to have over 499 divisors? View | 
--------------------------------------------------------------------------------------------------------------
98. Fibonacci : Sum of even-valued terms of Fibonacci SequenceView |
--------------------------------------------------------------------------------------------------------------
99. C++ User defined Function in Array ProgrammingView |
--------------------------------------------------------------------------------------------------------------
100.              C Program for Sum of all the Multiples of 3 or 5 below 1000 : From ProjectEuler.net | View |
--------------------------------------------------------------------------------------------------------------
101.   C/C++ Function: Overloading ExampleView |
--------------------------------------------------------------------------------------------------------------
102.   C/C++ Function: Print 45 Asterisks for Design the output | View |
--------------------------------------------------------------------------------------------------------------
103. C/C++ Function: Adding Two Numbers with default value parameter | View |
--------------------------------------------------------------------------------------------------------------
104.  C/C++ Function : Find Maximum value between two natural numbers | View |
--------------------------------------------------------------------------------------------------------------
105.  Char Array Calculation under C Programming Language | View |
--------------------------------------------------------------------------------------------------------------
106.   Fahrenheit to Celsius conversion (ºF to ºC) using C Programming | View |
--------------------------------------------------------------------------------------------------------------
107.  C and C++ : Interview Questions on "Types" | View |
--------------------------------------------------------------------------------------------------------------
108.  Article on C Programming Language | View |
--------------------------------------------------------------------------------------------------------------
109.  Print Prime and Sum using C Programming | View |
--------------------------------------------------------------------------------------------------------------
110.  Digit split and sum using C Programming | View |
--------------------------------------------------------------------------------------------------------------
111. Factorial in C Programming  | View |  
--------------------------------------------------------------------------------------------------------------
112.   Calculate the Series using C Programming  | View |  
--------------------------------------------------------------------------------------------------------------
113.  Find Ascii Values using C Programming  | View | 
--------------------------------------------------------------------------------------------------------------
114.  Goto statement in C Programming | View |  
--------------------------------------------------------------------------------------------------------------
115.  Float Array using c programming language  | View |  
--------------------------------------------------------------------------------------------------------------
116.  Matrix in C Programming Language | View |  
--------------------------------------------------------------------------------------------------------------
117.  Function in C Programming Language  | View |  
--------------------------------------------------------------------------------------------------------------
118.   Break and Continue in C Programming | View |  
--------------------------------------------------------------------------------------------------------------
119.  Sum the selected digits using C Language | View |  
--------------------------------------------------------------------------------------------------------------
120.  Write a C Program to count the currency notes | View |  
--------------------------------------------------------------------------------------------------------------- 
121.  Sum the digits  | View |  
---------------------------------------------------------------------------------------------------------------  
122.  C Programming Quiz Part-II | View |  
---------------------------------------------------------------------------------------------------------------  
123. Exercise in C Programming to find the Smallest Positive Number | View |  
---------------------------------------------------------------------------------------------------------------  
124.  Exercise in C Programming to find the Prime Factors | View |  
---------------------------------------------------------------------------------------------------------------  
125. Exercise in C Programming to create a Fibonacci SequenceView |  
---------------------------------------------------------------------------------------------------------------  
126. Exercise in C Programming for String Array with Pointer  | View | 
---------------------------------------------------------------------------------------------------------------  
127. C Programming Quiz : Part-I | View |  
---------------------------------------------------------------------------------------------------------------  
128.   String functions in C Programming | View |  
---------------------------------------------------------------------------------------------------------------  
129.   Sorting and Searching using C Programming Language(Data Structures) | View |  
---------------------------------------------------------------------------------------------------------------  
130. Array in C Programming : Dynamic | View | 
---------------------------------------------------------------------------------------------------------------  
131.  Array searching in C Programming | View |  
---------------------------------------------------------------------------------------------------------------  
132.   Adding Two Arrays using C  | View | 
---------------------------------------------------------------------------------------------------------------  
133. Array Filling Partially using C | View |  
---------------------------------------------------------------------------------------------------------------  
134.   Array With Pointer in C Programming | View | 
---------------------------------------------------------------------------------------------------------------  
135.  Array Filling from a file in C Programming  | View |  
---------------------------------------------------------------------------------------------------------------  
136.  Array with Meand & Standard Deviations | View |  
---------------------------------------------------------------------------------------------------------------  
137. Array using C Programming function | View |
---------------------------------------------------------------------------------------------------------------  
138.   Initializing & Printing an Array using C | View |  
---------------------------------------------------------------------------------------------------------------  
139.  Switch Case in C Programming | View |  
---------------------------------------------------------------------------------------------------------------  
140.   Example using Break and Continue statements in C Language  | View |
---------------------------------------------------------------------------------------------------------------  
141. Draw a Build Pattern in C Programming  | View |  
---------------------------------------------------------------------------------------------------------------  
142.  Reverse a String Using C | View | 
---------------------------------------------------------------------------------------------------------------  
143.  Check Odd or Even Number using C Programming | View | 
---------------------------------------------------------------------------------------------------------------  
144.  Creating Pyramid using C Language  | View |  
---------------------------------------------------------------------------------------------------------------  
145.   ELSE IF Ladder using C Language  | View | 
---------------------------------------------------------------------------------------------------------------  
146.   Nested IF example in C Programming  | View |  
---------------------------------------------------------------------------------------------------------------  
147.  IF ELSE example in C Programming Language | View | 
---------------------------------------------------------------------------------------------------------------  
148.   IF Statement in C Programming | View | 
---------------------------------------------------------------------------------------------------------------  
149.   Display numbers using loops in C Language | View |  
---------------------------------------------------------------------------------------------------------------  
150.  Fibonacci Series using C/C++ | View |
---------------------------------------------------------------------------------------------------------------  
151.    Finding Armstrong Number using C Language | View |  
---------------------------------------------------------------------------------------------------------------  
152.   Calculating Slope of a Line in C Language | View |  
---------------------------------------------------------------------------------------------------------------  
153.    Finding the equation in C Language | View |
---------------------------------------------------------------------------------------------------------------
154.  Distance between the two points using C Language  | View | 
---------------------------------------------------------------------------------------------------------------  
155.  Sum of ODD Numbers using C Language | View | 
---------------------------------------------------------------------------------------------------------------  
156.   Sum of EVEN Numbers using C Language | View |  
---------------------------------------------------------------------------------------------------------------  
157.  Sum of ALL Numbers using C Language  | View |
---------------------------------------------------------------------------------------------------------------  
158.  Write a C program to sum of 0 to N numbers  | View |  
---------------------------------------------------------------------------------------------------------------  
159.  Math Functions (Using COSINE Function) using C language  | View | 
---------------------------------------------------------------------------------------------------------------  
160.  Use of Subroutines in C Language | View | 
---------------------------------------------------------------------------------------------------------------  
161. Interest Calculation in C Language  | View | 
---------------------------------------------------------------------------------------------------------------  
162.  Adding Two numbers using float and integer data using C language | View | 
---------------------------------------------------------------------------------------------------------------  
163. Sum the Series using C Language | View |  
---------------------------------------------------------------------------------------------------------------  
164.   Find Perfect Number using C Programming | View | 
----------------------------------------------------------------------------------------------------------------
165.   Reverse an Integer Number using C Programming  | View | 
----------------------------------------------------------------------------------------------------------------  
166. C Program to check a PalindromeView |  
-------------------------------------------------------------------------------------------------------------------  
167.  C Program to Manipulate a Series | View | 
------------------------------------------------------------------------------------------------------------------  
168.  C Program to Check a Strange Number  | View |  
------------------------------------------------------------------------------------------------------------------  
169.  Prime Number Manipulation using C Programming Language | View |  
-------------------------------------------------------------------------------------------------------------------  
170.   Arithmetic Operation by C Language  | View |
-------------------------------------------------------------------------------------------------------------------
171.     Conditional Expression by C Language | View |  
--------------------------------------------------------------------------------------------------------------------
172.   Comparison Operator by C Language  | View |
---------------------------------------------------------------------------------------------------------------------
173.   Array programming by C Language  | View |
----------------------------------------------------------------------------------------------------------------------
174.   Find the highest (maximum) and lowest (minimum) grades in an array of 25 integer grades. Print the array and print the highest and lowest grades, labeled appropriately  | View |
----------------------------------------------------------------------------------------------------------------------
175.   Write a C program to find the Simple Interest. Take input for principle amount, rate of interest and time from terminal | View |
-----------------------------------------------------------------------------------------------------------------------
176.   Write a program performing as calculator which allows all Arithmetic Operators with operands as input | View |
------------------------------------------------------------------------------------------------------------------------