|
<<Previous
Home
Next>>
Learn C with example
C Examples
Hello Program In C:
Print all even numbers from 1 to 100:In this program we are going to explain how you can
print all even numbers from 1 to 100.
Input a number and sum its digits:In this example we are going to find
digits of a number and then add these digits to find the sum of digits.
Swap two number using two variables:In this example we are going two swap two
numbers using two variables.
Print
the sum of odd number and even number separately of n number:In this example we are going to find sum
of all odd and all even between a given number.
Input an alphabet and change its case:In this example we will learn how we can
convert cases of an alphabet. In this we have enter an alphabet. If it is
character between (a-z or A-Z). Then case will converted and if not then
"Have entered alphabet is not character.....:)" message
will display on screen
Accept
a number and check is it prime number or not a prime number:In
this example we are going to accept a number from keyboard then find is it
prime number or not
Check a number is perfect or not,(
perfect number is sum of its factor number):In this example we will explain how you
can find a number is perfect or not. A perfect number is number which is sum of
factor is equals to itself.
Print the multiword string:In this section you will learn how you can
take multiword string from keyword.
Greatest number
of any three given numbers:In this example we are going to find the
greatest number in any three numbers.
Print your own name n times using for
loop:In this example we are going to teach you
how you can use for loop and what is use of for loop.
Enter a number and show its
factor:In this example we are going to explain
how you can enter a number and how you can find its factor.
Input a character and check it vowel
or not:In this example we will learn how we can find a
character is vowel or consonant.
Print
average of n number:In this example we will learn how to
calculate average of n number. You have insert a number from keyboard then
this example will sum all the number from 1 to n then calculate average.
Print alphabets triangle inC:In
this example we are going to create an alphabets triangle. In this example
we are going to make a triangle which have A in first row B B
into second row ,C C C in second row and so on ..
Print alphabet triangle
Using C:
In
this example we are going to create an alphabets triangle. In this example
we are going to print alphabets triangle which first line has A,
second line B C ,third line D E F and so on .For this we are
using two for loops
Print Number Triangle in C:
In this example we are going to make a program by which we can Print numeric
Triangle. In this example we are going to print a number triangle. In this
number triangle we have 1 in first row,1 2 in second row ,1 2 3 in third row
and so on.
Print Number Triangle Using C:
In this example we are going to make a
program by which we can Print numeric Triangle. In this example we are going
to print 1 in first line, 2 2 in second line 3 3 3 in
third line ,and so on..
Enter
a number and print Star line in Reverse Order:
In this example we are going to make a
reveres triangle. In this example in first line we are printing * followed
by n-1 spaces, in second line ** followed by n-2 spaces ,so on..
Print Reverse Star Triangle Using C:
In this example we are going to make a reverse star triangle using c. In
this example we are going print * followed by n-1 space in first
line,** followed by n-2 space ,*** followed by n-3 space and so on
..
Print Reverse Star Using C:
In this example we are going to learn how we can make a reverse star using
C. In this example we are going to print ***...n in first line ,***...n-1
followed by one space,***...n-2 followed by 2 space and so on.
Print Star Triangle Using C:
In this example we are going to explain how we can make a star triangle. In
this example we are print * in first line ,** into second line,*** into
third line ,**** into fourth line and son on...
Print Star Rectangle in C:
In this example we are going to explain how we can make a star rectangle
using C language. In this example we are inserting number of rows and
columns .Then we are printing stars to make rectangle.
Print Star triangle C:
In this example we are going to print how
we can make a star triangle.
Print Alphabets Triangle: In
this example we are going to make an alphabetic triangle. In this example we
are going to print A in first row .In second row we are going to
print A B , in third line we are going to print A B C and so
on..
Input a Number and Count its Digit:
In this example we are going to find number of digits
into a number.
Print binary triangle Using C:
In this example we are going to print binary triangle
using C. We are printing 1 in first line ,0 1 in second line ,1
0 1 in third line ,0 1 0 1 in forth line and so on.
Input a Number and Print the Following
1*2*3*4*5*6......*n:In this
example we are going to print multiplication from 1 to n . Here n is number
which use will enter at run time.
Print The Reverse Number Using C:In
this example we are going to take a number from keyboard and then reverse
this number.
Reverse Star Triangle:
In this example we are going to print
reverse star triangle using C. In this example we are print *******..n in
first line,******..n-1 in second line,*******..n-2 in third line so on...
Print Number Star Triangle:
In this example we are going to print a number star
triangle using C. In this we are going to print 1 in line one, 2 3 in line two,
4 5 6 into line three,7 8 9 10 and so on..
Learn C with example
C Interview
Questions And Answers
C Objective Interview Questions And
Answers(10)
C Subjective Interview Questions And
Answers(100)
C Aptitude Questions(179)
C Interview Questions And Answers( Objective and Subjective)
<<Previous
Home
Next>>
|