Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Thursday, December 31, 2009

Write a program in 'C' to enter sales man name and sales. Find and print commission where comm = 4% on sales

#include<stdio.h>main(){char name [25];float comm, sales;printf("Enter name of sales man and sales\n");scanf("%s %f", name, &sales);comm = sales*4/100;printf("The commission is %f", comm);return(0);} For eg :-Output :-Enter name of sales man and salesFransis 10000The commission is 400.000...
read more "Write a program in 'C' to enter sales man name and sales. Find and print commission where comm = 4% on sales"

Write a program in 'C' to enter the base (b) and height (h) of a traingle and to calculate and print the area (a) where area = 1/2*base*height

#include<stdio.h>main(){float b, h, a;printf("Enter the value for base and height\n");scanf("%f %f", &b, &h);a = 0.5* b*h;printf("The area is = %f\n", area);return(0);} For eg :-Output :-Enter the value for base and height5 8The area is = 20.000...
read more "Write a program in 'C' to enter the base (b) and height (h) of a traingle and to calculate and print the area (a) where area = 1/2*base*height"

Write a program in 'C' to enter the radius and calculate and print the area of Circle using the formula area = TT * (radius)2, where TT = 3.14

#include<stdio.h>main(){float r, a;printf("Enter the value of radius\n");scanf("%f", &r);a = 3.14*r*r;printf("The area is %f\n", a);return(0);} For eg :-Output :-Enter the value of radius5The area is 78.50...
read more "Write a program in 'C' to enter the radius and calculate and print the area of Circle using the formula area = TT * (radius)2, where TT = 3.14"

Wednesday, December 30, 2009

write a program in 'C' to enter three integers and print the maximum integer?

#include<stdio.h>main(){int a, b, c, max;printf("Enter three integers\n");scanf("%d %d %d", &a, &b, &c);max = (a>b)?a:b;max = (max>c)?max:c;printf("The maximum integer is = %d\n", max);return(0);} For eg :-Output :-Enter three integers12 20 50The maximum integer is =...
read more "write a program in 'C' to enter three integers and print the maximum integer?"

write a program in 'C' to enter three integers and print the minimum integer?

#include<stdio.h>main(){int a, b, c, min;printf("Enter three integers\n");scanf("%d %d %d", &a, &b, &c);min = (a<b)?a:b;min = (min<c)?min:c;printf("The minimum integer is = %d\n", min);return(0);} For eg :-Output :-Enter three integers12 20 50The minimum integer is =...
read more "write a program in 'C' to enter three integers and print the minimum integer?"

Write a progam in 'C' to enter two integers and to print the minimum integers?

#include<stdio.h>main(){int x, y, min;printf("Enter two unequal integers\n");scanf("%d %d", &x, &y);min = (x>y)?y:x;printf("The minimum integer = %d\n", min);return(0);} For eg :-Output :-Enter two unequal integers25 35The minimum integer = 25...
read more "Write a progam in 'C' to enter two integers and to print the minimum integers?"

Write a progam in 'C' to enter two integers and to print the maximum integers?

#include<stdio.h>main(){int x, y, max;printf("Enter two unequal integers\n");scanf("%d %d", &x, &y);max = (x>y)?x:y;printf("The maximum integer = %d\n", max);return(0);} For eg :-Output :-Enter two unequal integers25 35The maximum integer =...
read more "Write a progam in 'C' to enter two integers and to print the maximum integers?"

Write a 'C' program to enter two integers and to print thier sum?

#include<stdio.h>main(){int a, b, s;prinft("Enter two integers\n");scanf("%d %d", &a, &b);s = a + b;printf("The Sum is %d\n", s);return(0);} For eg :-Output :-Enter two integers25 10The Sum is...
read more "Write a 'C' program to enter two integers and to print thier sum?"

How to type simple program in 'C'

Q.1) Write the output for the following in 'C' programa) Happy New YearAns :- #include<stdio.h>mani(){printf(" Happy New Year");return(0);} OutPut :-Happy New Y...
read more "How to type simple program in 'C'"

Tuesday, December 29, 2009

Rules Regarding 'C' Programm

1) At the beginning of the program we should include some header file with the help of #include statement.For eg :-#include<stdio.h>#include<conio.h>#include<math.h>2) The first function is main( ) or void main( ).If a program begins with main( ) then it should end with return(0);If a program begins with void main( ) then return(0); is not necessary.3) All the statement should be enclosed in a pair of braces...
read more "Rules Regarding 'C' Programm"

printf( ) function in 'C'

printf( ) :- This function is use to receive the output in the formatted manner. Format should be specified by the user. It is called as formatted output function. Having the following syntax :-Syntax:-printf("control string", arg1, arg2, arg3, ..........................................., argn);The meaning of control string is same as scanf( ) but the argument in the above function should not begin with & (ampersand) symbol...
read more "printf( ) function in 'C'"

scanf( ) function in 'C'

A) Formatted Input and Output ( )1) scanf( ):- This is used in ‘C’ programming to supply the data in a fixed formatted. Hence it is the formatted input function in ‘C’. The format should be specified by the user.The Syntax is:-scanf(“control string”, arg1, arg2, arg3, …………., argn);The control string gives the required formatting information. It must begin with the symbol % followed by a conversion character and a number specifying...
read more "scanf( ) function in 'C'"

Monday, December 28, 2009

Input and Output (I/O) Function in ‘C’

Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt;...
read more "Input and Output (I/O) Function in ‘C’"

Header files in ‘C’

Header files in ‘C’:-Most versions of ‘C’ include a collection of header files.In which the necessary information is store to support the library function.These files are include in the programme by using the #include statement at the beginning of the programmeFor eg:- #include<stdio.h>#include<conio.h>#include<math.h>Meaning:-1) <stdio.h> means the Standard input output header file.2) <conio.h> means...
read more "Header files in ‘C’"

Symbolic Constants in 'C'

Normal 0 false false false MicrosoftInternetExplorer4 st1\:*{behavior:url(#ieooui) } /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan;...
read more "Symbolic Constants in 'C'"

Sunday, December 27, 2009

Operators in 'C'

Operators in ‘C’These are the special symbol in ‘C’ which is used to do specific process. There are six types of operator in ‘C’ as follows:-1. Arithmetic Operator2. Relational Operator3. Logical Operator4. Conditional Operator5. Unary Operator6. Assignment Operator1) Arithmetic Operator:-They are used to do different arithmetic process as follows:-Operators Meaning+ Addition- Subtraction* Multiplication/ ...
read more "Operators in 'C'"

Constants in ‘C’

Normal 0 false false false MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt;...
read more "Constants in ‘C’"

Monday, December 21, 2009

Backslash Character Constants | Escape Sequence in ‘C’

These are the special character constant which are mainly used in the output function during ‘C’ programming. There are also called as Escape sequences some of them are as follows.Escape sequences Meaning1) \a audible alertIt alerts the user by sounding a bell through the speaker2) \b back spaceIt moves the cursor to the left by one position3) \n new lineIt takes the...
read more "Backslash Character Constants | Escape Sequence in ‘C’"

Sunday, December 20, 2009

Variables in ‘C’ and Identifiers in ‘C’

Variables names are used to store a data value. A variable may take different value during program execution. A variable is defined by the user for eg: - marks, total, average, etc.Rules to construct a variableEvery variable must begin with an alphabetIt may consist of alphabets or digits or the special symbols underscore _ but no other special symbol is allowed in it.A variable can be maximum 31 character long but many computers...
read more "Variables in ‘C’ and Identifiers in ‘C’"

Saturday, December 19, 2009

Keyword in ‘C’ / Storage Classes in ‘C’ / Basic data type in ‘C’

A keyword is that word in ‘C’ which has a fixed predefined meaning. Its meaning cannot be changed. Note that all keywords must be written in lowercase only. There are 32 standard keywords in ‘C’autodoubleint switchbreakelselong structcaseexternregistertypedefconstenumshort unioncharforsigned unsignedcontinuefloat staticvoiddogotosizeof volatiledefaultwhileifreturnTags: C programming language, Keyword in 'C', C programming...
read more "Keyword in ‘C’ / Storage Classes in ‘C’ / Basic data type in ‘C’"

Friday, December 18, 2009

Steps in learning 'C'

IntroductionC is a general-purpose computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system.Although C was designed for implementing system software, it is also widely used for developing portable application software.C is one of the most popular programming languages. It is widely used on many different software platforms, and there are few computer...
read more "Steps in learning 'C'"

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP