Saturday, April 19, 2014

Write a program to convert this temperature into centigrade degree

Temperature of a city in Fahrenheit degrees is input through the keyboard. Write a program to convert this temperature into centigrade degrees.






Convert temperature from degreee centigrade to fahrenheit....




Friday, April 18, 2014

Find out the aggregate marks and percentage marks obtained by the student

If the marks obtained by a student are input through the keyboard find out the aggregate marks and percentage marks obtained by the student. Assume that the maximum marks that can be obtained by a student in each subject is 100.




Output




Write a Program to calculate his gross Salary using C

Ramesh's basic salary is input through the keyboard His dearness allowance is 90% of basic salary and his house rent allowance is 10% of basic salary and his rural area is 6% of his salary and plus medical allowance 500 + mobile allowance is 500. Write a Program to Calculate his Gross Salary.




Output




Tuesday, April 1, 2014

Copy One File to another File

Home  �  C File Input/Output  �  Copy One File to another File







Write a Program How many Words in a File

Home  �  C File Input/Output  �  How many Words in a File







A Program Write data into File and Read data from File

Home  �  C File Input/Output  �  Write data into File and Read from File







Simple Union Program

Home  �  C Union  �  Simple Union Program




Output is as :
Name=Bintu
City=Muktsar





Structure and array

Home  �  C Structures  �  Structure and array









Structure within Structure (Nested Structure)

Home  �  C Structures  �  Structure within Structure




Output is as :
Enter the Name and City
Bintu
Muktsar
Name=Bintu
City=Muktsar





Monday, March 31, 2014

Simple Structure Program

Home  �  C Structures  �  Simple Structure Program






Note:- struct is the keyword which we can't use as a variable.




Pointer Program Using Function (Pass By Reference)

Home  �  C Pointers  �  Pointer Program Using Function (Pass By Reference)







Pointer Program

Home  �  C Pointers  �   Pointer







Recursion Function

Home  �  C Functions  �  Recursion Function







Function with argument and return value

Home  �  C Functions  �  Function with argument and return value




Output is as:

Enter the Two No. for Sum :
10
10
Sum= 20





Function with no argument and return value

Home  �  C Functions  �  Function with no argument and return value




Output is as:

Enter the Two No. for Sum :
10
10
Sum= 20





Function with argument and no return value

Home  �  C Functions  �  Function with argument and no return value




Output is as:

Enter the Two No. for Sum :
10
10
Sum= 20





Function with no argument and no return value.

Home  �  C Functions  �  Function with no argument and no return value




Output is as:

Enter the Two No. for Sum :
10
10
Sum= 20





Program to print a line of text by using the function

Home  �  C Functions  �  A Simple Function




Output

I am a Good Boy




Friday, March 28, 2014

strrev() - String Handling Functions



Output is as :
Enter the Name
Laura
aruaL






strlen() - String Handling Functions



Output is as :
Enter the Name
Laura
Length of String=5






strcpy() - String Handling Functions



Output is as :
Enter the two Names
Bintu
Chaudhary
Bintu Chaudhary






stcmp() - String Handling Functions



Output is as :
Enter the two Names
Bintu
Chaudhary
Both String are not equal






stcat() - String Handling Functions



Output is as :
Enter the two Names
Bintu
Chaudhary
BintuChaudhary






Two-Dimensional Array



Output is as :







Linear Array or One/Single Dimensional Array



Output is as :






Continue statement



Output is as :
I=1
I=2
I=3
I=4
I=5
I=7
I=8
I=9
I=10






break statement



Output is as :
I=1
I=2
I=3
I=4
I=5






goto statement









Nested for loop statement



Output is as :
*
**
***
****
*****






for Statement or for loop



Output is as :
I=1
I=2
I=3
I=4
I=5
I=6
I=7
I=8
I=9
I=10





do Statement or do loop



Output is as :
I=1
I=2
I=3
I=4
I=5
I=6
I=7
I=8
I=9
I=10





While Statement or While loop



Output is as :
I=1
I=2
I=3
I=4
I=5
I=6
I=7
I=8
I=9
I=10





Conditional Control Statement ? :









Thursday, March 27, 2014

Switch Statement



Output is as :
Enter the Choice from Four Days...
S = Sunday
M = Monday
T = Tuesday
H = Thursday

S
Sunday





Ladder if or else if statement

The marks obtained by a student in 5 different subjects are input through the keyboard. The student gets a division as per the following rules:

=> Percentage above or equal to 60 - First Division
=> Percentage between 50 and 59 - Second Division
=> Percentage between 40 and 49 - Third Division
=> Percentage less than 40 - Fail

Method: 1




Method: 2







nested if statement

/*If the ages of Ram, sham and Ajay are input through the keyboard, write a program to determine the youngest of the three*/

Output is as :
Enter the three Ages of Ram,Sham and Ajay
14
17
19
Ram is Youngest



Tuesday, March 25, 2014

if-else statement - C Programming

/*Any Number is input through the keyboard. write a program to find out whether It is and Odd Number or Even Number.*/



Output is as :
Enter the Number
4
This is Even Number