It
is C programming FAQ code examples to Crack Interview. It has C language basic and simple source code
by examples. It has arranged just like c tutorials with examples. This post contains
a big collection of examples of c program. If you have any doubt in the
following c program examples you are free to ask.
Frequently asked c programs in interview
8. Write a c program to check given string is palindrome number or not.
7. Write a c program to solve quadratic equation.
8. Write a c program to print Fibonacci series of given range.
9. Write a c program to get factorial of given number.
1. Write a c program to reverse any number.
2. Write a c program to find out sum of digit of given number.
7. Write a c program to solve quadratic equation.
8. Write a c program to print Fibonacci series of given range.
9. Write a c program to get factorial of given number.
12. Write a c program to generate multiplication table.
13. Write a c program to print ASCII value of all characters.
14. C program to print hello world without using semicolon
15. Write a c program which produces its own source code as its output
C program with numbers13. Write a c program to print ASCII value of all characters.
14. C program to print hello world without using semicolon
15. Write a c program which produces its own source code as its output
1. Write a c program to reverse any number.
2. Write a c program to find out sum of digit of given number.
10. Write a c program to find out NCR factor of given number.
11. How to convert string to int without using library functions in c
12. Program in c to print 1 to 100 without using loop
13. C program for swapping of two numbers
14. Program to find largest of n numbers in c
15. Split number into digits in c programming
16. C program to count number of digits in a number
11. How to convert string to int without using library functions in c
12. Program in c to print 1 to 100 without using loop
13. C program for swapping of two numbers
14. Program to find largest of n numbers in c
15. Split number into digits in c programming
16. C program to count number of digits in a number
L.C.M and H.C.F.
Swapping
Conversion ( Number System )
2. Write a c program to convert decimal number to octal number.
3. Write a c program to convert decimal number to hexadecimal number.
4. Write a c program to convert octal number to binary number.
3. Write a c program to convert decimal number to hexadecimal number.
4. Write a c program to convert octal number to binary number.
6. Write a c program to convert octal number to hexadecimal number.
8. Write a c program to convert hexadecimal number to octal number.
9. Write a c program to convert hexadecimal number to decimal number.
10. Write a c program to convert binary number to octal number.
9. Write a c program to convert hexadecimal number to decimal number.
10. Write a c program to convert binary number to octal number.
12. Write a c program to convert binary number to hexadecimal number.
13. C program for addition of binary numbers .
14. C program for multiplication of two binary numbers.
15. C program fractional binary conversion from decimal.
16. C program for fractional decimal to binary fraction conversion.
17. C program to convert decimal number to roman.
18. C program to convert roman number to decimal number.
19. C program to convert each digits of a number in words
20. C program to convert currency or number in word.
13. C program for addition of binary numbers .
14. C program for multiplication of two binary numbers.
15. C program fractional binary conversion from decimal.
16. C program for fractional decimal to binary fraction conversion.
17. C program to convert decimal number to roman.
18. C program to convert roman number to decimal number.
19. C program to convert each digits of a number in words
20. C program to convert currency or number in word.
Conversion ( Unit )
String
3. Write a c program to delete the all consonants from given string.
9. Write a c program to print the string from given character.
10. Write a c program to reverse a string
11. Reverse a string using recursion in c
12. String concatenation in c without using strcat
13. How to compare two strings in c without using strcmp
14. String copy without using strcpy in c
15. Convert a string to ASCII in c
10. Write a c program to reverse a string
11. Reverse a string using recursion in c
12. String concatenation in c without using strcat
13. How to compare two strings in c without using strcmp
14. String copy without using strcpy in c
15. Convert a string to ASCII in c
Matrix
5. Write a c program to find out transport of a matrix.
6. Write a c program for scalar multiplication of matrix.
7. C program to find inverse of a matrix
8. Lower triangular matrix in c
9. Upper triangular matrix in c
10. Strassen's matrix multiplication program in c
11. C program to find determinant of a matrix
6. Write a c program for scalar multiplication of matrix.
7. C program to find inverse of a matrix
8. Lower triangular matrix in c
9. Upper triangular matrix in c
10. Strassen's matrix multiplication program in c
11. C program to find determinant of a matrix
File
2. Write a c program to delete a file.
3. Write a c program to copy a file from one location to other location.
6. Write a c program which writes string in the file.
9. Write a c program which concatenate two file and write it third file.
10. Write a c program to find out size of any file.
11. Write a c program to know type of file.
12. Write a c program to know permission of any file.
13. Write a c program to know last date of modification of any file.
14. Write a c program to find size and drive of any file.
10. Write a c program to find out size of any file.
11. Write a c program to know type of file.
12. Write a c program to know permission of any file.
13. Write a c program to know last date of modification of any file.
14. Write a c program to find size and drive of any file.
Complex number
3. Write a c program for multiplication of two complex numbers.
4. Write a c program for division two complex numbers.
Series
6. Write a c program to find out the sum of given H.P.
Array
6. Write a c program for insert an element at desired position in an array.
7. C program to find largest and smallest number in an array
7. C program to find largest and smallest number in an array
Sorting
5. Write a c program for heap sort.
7. Write a c program for shell sort.
Recursion
Size of data type
Using pointer
Searching
Area and volume
2. Write a c program to find the area of any triangle.
3. Write a c program to find the area of equilateral triangle.
4. Write a c program to find the area of right angled triangle.
3. Write a c program to find the area of equilateral triangle.
4. Write a c program to find the area of right angled triangle.
6. Write a c program to find the area of trapezium.
7. Write a c program to find the area of rhombus.
8. Write a c program to find the area of parallelogram.
7. Write a c program to find the area of rhombus.
8. Write a c program to find the area of parallelogram.
9. Write a c program to find the volume and surface area of cube.
10. Write a c program to find the volume and surface area of cuboids.
11. Write a c program to find the volume and surface area of cylinder.
10. Write a c program to find the volume and surface area of cuboids.
11. Write a c program to find the volume and surface area of cylinder.
12. Write a c program to find the surface area and volume of a cone.
13. Write a c program to find the volume and surface area of sphere.
13. Write a c program to find the volume and surface area of sphere.
14. Write a c program to find the perimeter of a circle, rectangle and triangle.
C program with very large numbers
1. Write a c program to find factorial of 100 or very large numbers
2. Write a c program to multiply the two very large number (larger the long int)
3. Write a c program for division of large number (larger than long int)
4. C code for modular division of large number.
5. C code for division of large number.
6. C code for power of large numbers.
Other
1. C program for ATM transaction.
C program with very large numbers
1. Write a c program to find factorial of 100 or very large numbers
2. Write a c program to multiply the two very large number (larger the long int)
3. Write a c program for division of large number (larger than long int)
4. C code for modular division of large number.
5. C code for division of large number.
6. C code for power of large numbers.
Other
1. C program for ATM transaction.
7. Write a c program to print the all prime numbers between 1 to 300.
8. Write a c program which passes structure to function.
9. Palindrome in c without using string function
10. How to get the ASCII value of a character in c
11. C program to get last two digits of year
12. C program without main function
8. Write a c program which passes structure to function.
9. Palindrome in c without using string function
10. How to get the ASCII value of a character in c
11. C program to get last two digits of year
12. C program without main function
529 comments:
«Oldest ‹Older 201 – 400 of 529 Newer› Newest»thanx for this site
#include
#include
void main()
{
long int num;
int d;
int x;
int count=0;
printf("enter the number");
scanf("%ld",&num);
printf("\n\nenter the digit you want to find the occurence");
scanf("%d",&d);
while(num!=0)
{
x=num%10;
num=num/10;
if(x==d)
{
count++;
}
}
printf("The %d occurs %d times in a %ld.",d,count,num);
getch();
}
write a program in c to print the any character or digit in a 10th row 20th coloumn without using gotoxy or gotorc function?
write a program in c to make the caps lock on?
write a program in c to make delete key=ctrl+alt+delete. means whenever someone press delete key it will be recognised as ctrl+alt+delete.
write a program in c to make your own dos command?
char far *v,*f?
do v and f both enjoy the pointer of type char far
or not?if yes then why and if no then why?
can you help me on how to make a program in c language that can convert metrics to english or vice versa?
Write a programm, according to Gregorian Calendar, it was monday on the date 01/01/01. if any year is input through the keyboard so write a programm to find out what is the day on 1st january of this year.
by if else statements....
hii frnd i am a begginer of C programming language .. i m studing "LET US C" by YASHVANT KANETKAR. but it seems so difficult .can anyone suggest me that how can i make my learning effective and easy.coz i want to make my carrier in programming ,i want to teach programming..so need help and suggestion how can i make my concept stronger of C programming.even i find difficulty to learn if-else statements...
to compute fibonacci number fib (n) by recursive process? pls tell this prgm soon..
1 5 9 7 3
5 5*5 5*9 5*7 5*3
4 4*5 4*9 4*7 4*3
9 9*5 9*9 9*7 9*3
3 3*5 3*9 3*7 3*3
2 2*5 2*9 2*7 2*3
we have given first row and first column and we have to write code for multiplication part.
#include
#include
void main()
{
clrscr();
int i,c=1,n,sum,series;
printf("Enter limit");
scanf("%d",&n);
printf("\n");
for(i=0;i<n;i++)
{
series=1.0/c;
sum=sum+series;
c++;
printf("%d",sum);
getch();
}
pascal triangle prog
view of programm
it's excellent
how to find a random number in c with out using rand function , please reply to me ..............
write a program to find the power of 12 without using pow function ?
the output should be in the form of
2 power 12
3 power 12...so on ...
1,2,3,4,5,1,2,3,1,2,3,4,5......
separate the series like
1,,2,3,4,5 and a,2,3
and 1,2,3,4,5
ten find the sum of this series .. guys please help me ......
int i,j,k ;
i=0,j=1;
int fib (int);
printf("%d %d",i,j);
k=i+j;
printf("%d",k);
f=fib(n)
{
i=j;
j=k;
k=i+j;
return k;
}
Dear friend ...this is amazieg site ...any boday can learn C with the help of this webpage...thanks shring!!
i generaly confused with pointer can u explai the concept of pointer piz......?
Write a program using recursion that prints the following series: 2,4,6,8,6,4,2 by using a storage class.
plz help me to write dis program
declare two array A & B ,find (i)A intersection B and(ii)A union B
CAN ANY1 TELL HW TO Write a program that keeps takes three strings as input namely the input string, pattern string and replacement string. Program finds the pattern in the input and replaces every occurrence of pattern with the replacement string as shown below. Nothing is done if pattern string is not found. RPLU ASAP...
This site has saved me so many times! truly grateful for such beautiful easy to understand code!
please help me with this code.You will implement an algorithm that represents a simplified, two-player version of
blackjack (also known as “21”). A dealer shuffles cards and distributes them. The goal of
the game is to get as close to 21 as possible without going over 21. If the dealer or player
goes over 21, then that hand loses. If neither player not dealer have scored 21, then the
hand with the higher score wins
Really very good site...please tell me if there is a site for PHP too !!!
write a function prototyped below:
float single_tax(float*income);
the argument is taxable income,and the function returns the appropriate amount of tax.
the u.s federal income tax for single person in 1995 is computed according to the following rules:
if your taxable income but not over your tax is of the amount over
is over
$0 $23350 15% $0
23350 56550 $3502.50+28% 23350
56550 117950 12798.50+36% 56550
117950 256500 31832.50+36% 117950
256500 - 81710.50+39.6% 256550
i am not able to find solution for this.please help me anyone.
can u add programs for linked list..plzzzzzz
pleazzzzzzzzzzzz can any one search a code for this
c code to solve knapsack problem using exhaustive brute force
if found mail me ok
will be grateful to u
question1: write a array program where user enter the element of array and place the no in odd position which is
most repeated in array.
example:{f,l,k,f,o,j,p,j,f}
ans{f,l,f,f,f,j,f,j,f}
M & N imports batteries from Japan. Each box that is imported has the following properties
How many dozen in the box
Manufacturer
Manufacture date
Name of batteries
Country of manufacture
Date of purchase
Dimension of the box in which the batteries are packed. The length, width and height of the box are the same
Cost price of a single box of batteries
The company hires containers of varying sizes based on how much they want to import. There are only three sizes/dimensions of containers to be hired. The container people levy a fee that is 1% the cost price of the box. Each type of battery occupies its own container. To maximize profit, the company makes sure it doesn’t transport batteries that are less half the container. If the boxes required are less, the order is cancelled. All batteries get into the country through Busia, a district that borders Kenya. Each and every box of batteries is levied a tax that is 10% the cost price. For Each box sold, the company would like to generate a profit of 20% the cost price. If one is buying, they can’t buy below 3 boxes. If the stock of batteries goes below a certain number, the system should notify the user of the system.
The company would like to implement an information system using C programming. Write a c program whose input may include the following but is not limited to that
1. Number of boxes to be imported.
2. Properties of the boxes to be put in the container as per the list above. (same in the same container)
3. The three dimensions of containers available for hire
4. How many boxes have been purchased
5. Number below which the system should request the company to purchase
Output can include the following but is not limited to that:
1. Which container is used for a given pack
2. How many boxes are available in stock
3. How much profit made assuming no other expenditures (apart from what has been indicated above)
4. How many boxes have been sold out
5. Which name of battery is selling the most
6. Which country is supplying the company with batteries most
Modules should include
1. Capital input
2. Sales
3. Transport
4. Main
How do I find the error in the given program ????
#include
#include
struct node
{
int studentid;
int marks;
struct node *next;
};
struct node* insertStudentRecord(struct node* start,int studentids,int markss) ;
int maximumMarkofStudent(struct node* start);
int studentIDwithMaximumMark(struct node*,int maxMark);
main()
{
struct node *start;
int studentids,maxMark,studentID;
int markss;
start=NULL;
printf("\nEnter the id of student :");
scanf("%d",&studentids);
do
{
printf("\nEnter the marks of student: \n");
scanf("%d",&markss);
start=insertStudentRecord(start,studentids,markss);
printf("\nEnter the id of student or press -1 to terminate: :");
scanf("%d",&studentids);
}while(studentids!=-1);
maxMark=maximumMarkofStudent( start);
printf("\nMaximum marks=%d",maxMark);
studentID=studentIDwithMaximumMark(start,maxMark);
printf("\nStudentID=%d",studentID);
}
struct node* insertStudentRecord(struct node* start,int studentids,int markss)
{
struct node *ptr,*temp;
ptr=(struct node*)malloc(sizeof(struct node));
EXPRESSION:1;
ptr->marks=markss;
ptr->next=NULL;
if(start==NULL)
start=ptr;
else
{
temp=start;
while(CONDITION:1)
{
temp=temp->next;
}
temp->next=ptr;
}
return start;
}
int maximumMarkofStudent(struct node* start)
{
struct node *temp;
int max=0;
temp=start;
max=temp->marks;
while(temp->next!=NULL)
{
temp=temp->next;
if(CONDITION:2)
max=temp->marks;
}
return max;
}
int studentIDwithMaximumMark(struct node *start, int maxMark)
{
struct node *temp;
temp=start;
while(CONDITION:3)
{
if(maxMark==temp->marks)
{
break;
}
else
temp=temp->next;
}
return temp->studentid;
}
M & N imports batteries from Japan. Each box that is imported has the following properties
How many dozen in the box
Manufacturer
Manufacture date
Name of batteries
Country of manufacture
Date of purchase
Dimension of the box in which the batteries are packed. The length, width and height of the box are the same
Cost price of a single box of batteries
The company hires containers of varying sizes based on how much they want to import. There are only three sizes/dimensions of containers to be hired. The container people levy a fee that is 1% the cost price of the box. Each type of battery occupies its own container. To maximize profit, the company makes sure it doesn’t transport batteries that are less half the container. If the boxes required are less, the order is cancelled. All batteries get into the country through Busia, a district that borders Kenya. Each and every box of batteries is levied a tax that is 10% the cost price. For Each box sold, the company would like to generate a profit of 20% the cost price. If one is buying, they can’t buy below 3 boxes. If the stock of batteries goes below a certain number, the system should notify the user of the system.
The company would like to implement an information system using C programming. Write a c program whose input may include the following but is not limited to that
1. Number of boxes to be imported.
2. Properties of the boxes to be put in the container as per the list above. (same in the same container)
3. The three dimensions of containers available for hire
4. How many boxes have been purchased
5. Number below which the system should request the company to purchase
Output can include the following but is not limited to that:
1. Which container is used for a given pack
2. How many boxes are available in stock
3. How much profit made assuming no other expenditures (apart from what has been indicated above)
4. How many boxes have been sold out
5. Which name of battery is selling the most
6. Which country is supplying the company with batteries most
Modules should include
1. Capital input
2. Sales
3. Transport
4. Main
Write a program to find the prime numbers in a given range and print them in a text file.
Can u make dis code pls? pls hlp me
awesome buddy....1 of the best sites to get expertice in c.....thanks a lot..
Hope this might help you!
#include
int main()
{
int num[25], n,i,sum=0;
printf("Enter the number:\n");
scanf("%d", &num);
printf("Enter the number to be searched for Occurance:\n");
scanf("%d", &n);
for(i=0;i<sizeof(num);i++)
{
if(n==num[i])
sum++;
}
printf("The number of occurances of %d: %d", n, sum);
return 0;
}
- Prasad
Write a program that takes a long string as input, and corrects the following:
a If there is a missing space, add it (there should always be a space after a comma or a
fullstop).
b If there is an extra space, remove it.
c If there is a letter that is wrongly capitalized, correct it.
d If there is a letter that should be capitalized and is not, correct it.
For example: “hello Every One, nice to Meet YOU.haVE a nice day” should be “Hello every one,
nice to meet you. Have a nice day”.
please help me
thanks
Write a program that takes a long string as input, and corrects the following:
a If there is a missing space, add it (there should always be a space after a comma or a
fullstop).
b If there is an extra space, remove it.
c If there is a letter that is wrongly capitalized, correct it.
d If there is a letter that should be capitalized and is not, correct it.
For example: “hello Every One, nice to Meet YOU.haVE a nice day” should be “Hello every one,
nice to meet you. Have a nice day”.
please help
thx
didnt understand
pls enlignten
write a program that will take the value from the keyboard , if the value is positive the program gives the message value positive and if the value is negative message print the value is negative
how to write a c program to calculate valency of an element given the atomic no....
Write a program to measure the idleness of the CPU
pleasa help...
Write a c program to measure the idleness of the CPU
Wow... great list of programs, Now we don't have to purchase any book.
Write a program to extract values in vgdisplay and calculate total disk space used in VG00,
where : total disk used = PE size * Alloc PE .
This the sample value of vgdisplay output.
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 7
Open LV 7
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 4350
VGDA 4
PE Size (Mbytes) 4
Total PE 8680
Alloc PE 8650
Free PE 30
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
Please solve my problem..
Question:
There are multiple directions to reach from destination A to destination B.
In the two given destinations assume there are four different directions to start from destination A and reach destination B.
Delhi to Jaipur
1.Delhi->Gurgaon->Bhiwadi->Bawal->Macheri->Jaipur
2.Delhi->Faridabad-> Palwal ->Sohna->Bawal->Macheri->Jaipur
3.Delhi->Jhajjar->Rewari->Bawal->Macheri->Jaipur
4.Delhi->Sohna->Bawal->Macheri->Jaipur
Write a 'C' program to identify shortest route from destination A and destination B and also all the available routes from A to B. Note: A and B does not mean as Delhi & Jaipur, it could be any teo places given in the above routes.
Please please solve my problem.
Please give me code for 9,19,29,39,49,59,69,79,89,99,109,.............
i need program that 4 load becomes on-off with push button. once the button pushed one load on and when nexttly push button pushed then off.
Please solve my problem..
Question:
There are multiple directions to reach from destination A to destination B.
In the two given destinations assume there are four different directions to start from destination A and reach destination B.
Delhi to Jaipur
1.Delhi->Gurgaon->Bhiwadi->Bawal->Macheri->Jaipur
2.Delhi->Faridabad-> Palwal ->Sohna->Bawal->Macheri->Jaipur
3.Delhi->Jhajjar->Rewari->Bawal->Macheri->Jaipur
4.Delhi->Sohna->Bawal->Macheri->Jaipur
Write a 'C' program to identify shortest route from destination A and destination B and also all the available routes from A to B. Note: A and B does not mean as Delhi & Jaipur, it could be any teo places given in the above routes.
Please please solve my problem.
longint=968794869749.. Find the biggest number of this value and how many times occurs on that number?
write a program that prompts you to capture a number then displays its character (A-Z) equivalence.
Really very good blog for help to us
thanks brother for your help
[Error] cannot convert 'int*' to 'char*' in assignment
wap to calculate equation of straight line using c
thank you .... such a wonderful site learnt lot from it .. helpful for beginners like me .
hi i am amani .......Please help me ...
write a program that display the menu below and uses a do loop to check for valid responses, (the program does not need to implement the actual function ,just for that :
Account Information :
1-Enter account number.
2-Enter user name.
3-Search the list.
4-Correct user name.
5-Quit
* Enter the number of your choice (1 to 5).
can anybody tell me how to add numbers 1-100 into an array neither taking input from the user nor through array initialization plzzzz!!!!
let me knw if smebdy knows thank you........
can anybody plzz tell me how to add 1-100 numbers in array by neither takin input from the user nor array initialization!!!!
How to write the program for get output like this? Repeated letter print exactly one time only.
string="JEEVAN"
J
E E
V V V
A A A A
N N N N N
How to print the matrix number like following way using array?
1 2 3 4
5 6 7 8
9 0 1 2
3 4 5 6
print 1234826543956710 (Top row, Then right column, then 4th row, then left column, Then 2nd row 2 element)
Can u help me out with some programs?
1. Write a program which reads an array and determines if there are any repeated elements in it. The program prints the repeated elements with their frequency.
2. Write a program that reads a matrix and prints the elements of a row with the highest sum after having inverted all the elements of each cell.
3. Write a program that reads n letters from a text file and prints all the possible combinations of these letters.
4. Write a program that determines which letter of the alphabet is repeated the most in a text file.
Please, I have an exam tomorrow!!!
Write a c program which reads a full line of text and prints number of words which start and end with a particular character
Remove consonants
#include
int main()
{
char str[100];
int i;
int count=0;
printf("\n Enter the string");
scanf("%s",str);
for(i=0;str[i]!='\0';i++)
{
count++;
if(str[i]=='a'||str[i]=='e'||str[i]=='i'||str[i]=='o'||str[i]=='u')
continue;
else
str[i]='\0';
}
printf("\n%d",count);
for(i=0;i<count;i++)
{
printf("%c",str[i]);
}
return 0;
}
write a program to check the number is palindrom or not without function.
the site is awesome.
please help me!
i want only two numbers from console screen in c;then what code will be needed?
reply me
hemantkonade25@gmail.com
plz give me code for add,sub,mul,division program using function
main()
{
int n,r=0,t,x;
clrscr();
printf("\n accept n value");
scanf("%d",&n);
x=n;
while(n!=0)
{
t=%10;
r=(r*10)*t;
n=n\10;
}
if(x==r)
prntf("\n palindrome");
else
prntf("\n not palindrome");
}
BY MADHU PAGIDIPALLI ANY halp.. madhupagidipalli@gmail.com
Write a program that searches the largest common sub string between two strings
For example:
abcyahyaezzeldinelnegm
yahyaezzelarabelhelaly
the expected output is yahyaezz
i want to a program to change the selected characther with another selected character
Awesome site!!
thanq sooo much
it helped me to test my knowledge
thanks a lot
and i req. u to upload more programs abt c in depth
please give me the c language code for following output
7
14 15
28 29 30 31
56 57 58 59 60 61 62 63
Create a square box with asterix only on the perimeter .....Write the Cprogram plz help me on this
I need a method, Method should accept two parameters.
First parameter is first number to display, second parameter should be number of rows to be printed.
EX:
printseries(7,4)
Output should be:
7
14 15
28 29 30 31
56 57 58 59 60 61 62 63
write a c program to find abbreviation of name for example
INPUT: RAHUL KUMAR PANDEY
OUTPUT:R. K. PANDEY and if user input only name without title then output should be as shown below
INPUT: RAHUL
OUTPUT:RAHUL.
Nice work. I believe u r the number one in c. But i did not found any reply/modification of problems from comments section. I have tried lot in my blog. i am expecting suggestions from you too..
Please visit: www.cprogramming-bd.com
Nice work. I believe u r the number one in c. But i did not found any reply/modification of problems from comments section. I have tried lot in my blog. i am expecting suggestions from you too..
Please visit: www.cprogramming-bd.com
can u plz tell me how to solve this problem give me the code when we take the password it must show as a asterisk not the int taking input frm user do it by for and while loop plz..
like atm machine which shows the asterisk when we enter the pass
Take input of 10 numbers in an array and find out how many of them are prime number in the array.
write a program to check the no. is greater or equal to 500
hi sir.. your blog is great!
Your codes are easy to understand :) Great help for me. Could you please make a program that will do r's and r-1 complement. please :)
pls ans..
create a program that will
a. r's and r-1's complement of decimal
b. r's and r-1's complement of binary
c. r's and r-1's complement of octal
d. r's and r-1's complement of hexadecimal
thanks a lot..
plzzzz send code for sorting the positive elements from the array
I have a matrix as usual For example
1 2 3
4 5 6
7 8 9
How to print the numbers inside it in the spiral way..
That is, 123698745 ?
The Code must also work for any n x n matrix also. Can u post it ?
Create a program that computes for the average of the numbers entered by the user. Getting of the input will only terminate if the user will enter a negative number.
Enter number: 30
Enter number: 40
Enter number: 28
Enter number: 90
Enter number: 68
Enter number: -20
Average is 51.
Write a “C1GG filter” that reads a message entered by the user and translates
it into C1GG message:
Sample Run:
Enter message: Hey dude, C is rilly cool
C1GG message: H3Y DUD3, C 15 R1LLY C00L!!!!!
The program should convert the message to upper-case letters, substitute
digits for certain letters (A->4, B->8, I->1, O->0, S->5), and then append 5
exclamation marks.
sir Ineed program which is to convert upper case string to lower case and vice versa using c.also i need aprogram which is arrange names in albhabetic using c with output for both programs
Can anyone help me with this program?
Input positive integer n. Compute the following:
1/1!+1/2!+ .... +1/n!
Keep exactly 5 digits after the decimal point.
write three unary operator
Can anyone help me with this program please?
Count the number of $ in the input. Output the result.
Sample input - as$dfkjhkjkjdhf asdfkj$lskdfj werijweirjo$wie
Sample output - 3
Help Please!?
Input positive integers m and n (m<=n). Compute the sum of all prime numbers in [m,n]. [m,n] stands for all values between and including m and n.
Input - m n
Output - sum of prime numbers
Sample Input
2 3
Sample Output
5
Input positive integers m and n (m<=n). Compute the sum of all prime numbers in [m,n]. [m,n] stands for all values between and including m and n.
Input - m n
Output - sum of prime numbers
Sample Input
2 3
Sample Output
5
Count the number of $ in the input. Output the result.
Input many characters
Output number of $
Sample Input as$dfkjhkjkjdhf asdfkj$lskdfj werijweirjo$wie
Sample Output 3
plz help me to write program in C "for any mXn matrix,determine whether the matrix is symmetric or skew symmetric,singular or non singular or orthogonal if nonsingular,the program should compute the inverse of the matrix.
plz help me to write a program for any matrix (mxn),determine whether the matrix is symmetric or skew-symmetric,singular or non singular or orthogonal,if non singular,the program should compute the inverse of the matrix.
this website is good and easy to understand
this website good and easy to understand
Ur site is really very helpful for all those who have queries. will u please help me in finding a solution to a C program to input sales of a month in 1 dim array for 35 salesmen.Calculate total sales & identify salesman who has sold the most
hi,
can u please write the program which gives the following output
1
0 1
1 0 1
0 1 0 1
1 0 1 0
OMG.................
This website is really so so useful and it perfectly matches the answer what i search ... keep on updating .......... i will suggest this website to all my friends.....
very nice site .......... thanx.. it helped me allot ...
write down program in which take input roll no and different subiect marks? also calculate total,percentage and gade and praint all values?
can i get the C code for binary subtraction and binary division...?
#include
int main()
{
int n, sum = 0, c;
printf("Enter the number upto you want to add\n");
scanf("%d", &n);
printf("SOLUTION:-\n");
for (c = 1; c <= n; c++)
{
sum = sum + c;
if(c<11)
{
printf("%d+",c);
}
if(c==10)
{
printf("\b=%d",sum);
}
}
return 0;
}
write a program to print patterns with the help of two dimension array
Write the function strreplace(s, chr, repl_chr) which will replace each occurrences of character chr with the character repl_chr in the string s. The function returns the number of replacements. Place the source code of this function in a file named strreplace.c
Write the function strreplace(s, chr, repl_chr) which will replace each occurrences of character chr with the character repl_chr in the string s. The function returns the number of replacements. Place the source code of this function in a file named strreplace.c
WAP that accepts nos from 0-9 along with the string to be displayed a specified no. of times use the switch case construct...
can someone plz help me with this...
wap to find sqrt of number without using sqrt function.
anyone plz help me.....
i need a c program if i give m,s,a,e,1,0 as input it will give the output as same10.......
plz help me
plz give me a simple program using operator precedence and associativity
plse help
write a programme to calculate length of given stream.
write program to calculate length of given stream
rply
write a program to calculte length og given stream
write a program to calculte length og given stream
write a program to calculte length og given stream
#include
int main()
{
int num,i;
printf("Enter the number,to get a table:-\n");
scanf("%d",&num);
for(i=1;i<=10;i++)
{
printf("%d x %d = %d\n",num,i,num*i);
}
}
I thnk for real table format there shud b single corectn.
In place of printf("\n%d",num*i);
I shud be printf("\n%dx%d=%d",num,i,num*i);
.Write a program that takes a sequence of lines and display each line with four letter words replaced by asterisks.
plz give me the code for finding the square root of larger number suppose 1000 or any larger number .
your collection is awesome it helps a lot.
thanks
plz give me a program to fin out the square root for larger number suppose 1000 or any larger number
a text file contains a list of integers in order from lowest to highest.write a program to read and print
the text file with all duplications eliminated.
guys PLZ send me the program.....
Write a program that has two 2D arrays A[r][c] and B[r][1].Take input from user in array A and in Array B each row would be equal to the SUM of Corresponding row of A.
PLease give me code of that
can any one help me to write c programm to find row sum and coloumn sum of a matrix?
#INCLUDE
#include
void main()
{
int a,b,c,d;
clrscr();
printf("enter the three number");
scanf("%d%d%d",&a,&b,&c);
d=a+b*c;
printf("%d",d);
gtetch();
}
Write a C program that generates a diamond? It takes input from user and
generates the diamond accordingly.
Write a C program that generates a diamond? It takes input from user and
generates the diamond accordingly.
Given two integers, multiply them.
Input:
An integer T denoting the number of testcases.
T sets of two integers A and B on separate lines.
-10^(1000)< A, B < 10^(1000)
Output:
The result of A * B.
Sample Input:
2
12345612312345632453123423442122343234
98736462562456373737387637671678628768
-5
4
Sample Output:
1218962087888515002343357130588851003810953310781392320488760173108162555712
Problem 5
Given a string, find the longest substring that is a palindrome. If there are multiple such strings print the
lexicographically smallest substring.
Input:
One string per line.
Length of the string < 10,000
Output:
The longest palindrome substring per line.
Example:
Sample Input:
aabcdcbop
bbccaa
Sample Output:
bcdcb
aa
Two sentences are said to rhyme, if their last two characters are the same.
For example, the following two sentences rhyme:
It's a lovely weather today
Time to feed the cow some hay
Your task is to find the rhyme scheme of a given stanza (A stanza is defined as a collection of lines). A
rhyme scheme is usually referred to by using letters to indicate which lines rhyme; lines designated
with the same letter all rhyme with each other. In other words, it is the pattern of end rhymes or lines.
http://en.wikipedia.org/wiki/Rhyme_scheme
Input:
An integer T denoting the number of stanzas to follow.
Each stanza ends with a #. The stanza itself will only contain the letters [a-z] and spaces. The last two
letters of each line will only be letters [a-z].
Output:
Rhyme scheme for each stanza on a separate line. The rhyme scheme will contain as many letters as
there are lines in the stanza. So, for example, if the stanze contains 12 lines, the rhyme scheme will
contain 12 letters.
You'll denote the rhyme scheme using the letters [A-Z].
Sample Input:
4
boat heat mat
soap globe
band robe
murder probe
mad cat#
sunday
monday
tuesday#
weather
laptop
books
summer vacations#
all
daughter
small
manner#
Sample Output:
ABBBA
AAA
ABCD
ABAB
Please help me to display following output using nested loops
Output:
1, 4, 7, 10, 13, 16
2, 5, 8, 11, 14, 17
3, 6, 9, 12, 15, 18
excellent website cquestions.com it teaches u from the starting what is c programme
awesome................ .i suggest all my frnds to use this web site for learning c programme..
Nice progs!
how to print the
SUM= 2+3-6+11-18.........+UPTO N
Plz...is der ne way of getting all dese programs in c++......plz...guys cmnt.....!!!
These are common questions for programming in C and C++. Personally, I prefer C++ as a programming language. I find it easier to code in this language than in C. Anyway, I think that you have a good collection of the common questions that students are asked to answer when they are first learning the language. Thanks for sharing.
Very good for Begineers :)
Can anybody tel me how to add 2 digits with out using any operator
hey sir please help me following program
calculate the sum of following series upto first 20 items
s=1^4+2^4+3^4+5^4+7^4+.....................
please help me.....write a program to find the number of zeroes in the given number
bu harika
bu harika teşekkürler (:
Hi, can someone here give me tips at least on this question Write a recursive function printEvenOdd such that given a positive integer number as
argument, the function will first print all even digits from right to left, followed by all
odd digits from left to right. For example, the argument 12345 will cause the program
to output
4
2
1
3
5
Thanks in advance
write a c program to process students record using structures.It is required to find the first rank holder of a class,school as well as the toppers in all subjects.Assume that there are 3 branch each having 50 students.There may be more than 1 first rank and more than 1 paper for any subject
write a c program to read file, counting how many duplicated characters are in the file.
write a c program to read file, counting how many duplicated characters are in the file.
very useful..................
thnx a lot
can any one post the programme currency conversion using structure and function and user hasto input the data...
Your website is awesome. Thanks a lot. I spent all my day with this today
can anyone give c code for array implementation of booth's multiplication algorithm
please it is urgent.... thanks in advance
can anyone give c code for array implementation of booth's multiplication
can you give me example about EOF(end of file)? i want to user write number as much as he wants then terminate the program with eof and after that i want to print it out in screen like this
Enter numbers:
1 2 3 4 1 5 3 6 2 8
You entered this numbers :
1 2 3 4 1 5 3 6 2 8
Nice tutorial.....Please can you make zip file for all programmes
i need help !!
Write an assembly program that reads the size of a right triangle and then prints it by asterisks. For example, if your program reads a size of 5, it should print:
*
**
***
****
*****
i need help
Write an assembly program that takes 10 integers and finds the two largest values among input integers
Please somebody help
:1 a c program to accept a list of 10 numbers, calculate average and then display the numbers and the average
2 a c program that stores admission numbers and marks obtained by four students. the program should display on the screen
i need some help:
Write a program that inserts 15 random integers from 0 to 100 in order in
a linked list. The program should calculate the sum of the elements and
the foating-point average of the elements
Write a program that merges two ordered lists of integers into a single
ordered list of integers. Function merge should receive pointers to the first node of each of the lists to be merged and should return a pointer to the first node of the merged list.
for(i=1; i<=4; i++)
{
for(j=1; j=i; j++)
{
printf(i*i);
}
printf("\n")
}
answer dis c program to print all combination of a 4 digit number
anyone please answer to the previous question
hi friends any one help me to create the c program to sort n numbers in ascending order using function
Pls help need out for loop showing
enter number:3
enter number:5
enter number:7
enter number:10
enter number:1
sum is 17
please help, thank you in advance
for complex programs on macros visit cncreate.blogspot.in
2.6: Census:
Module for AcceptValues:
1. FOR loop1=1 -> n
1.1 FOR loop2=1 -> 7
1.1.1 READ Data[loop1][loop2]
2. State[25] = {all names of states}
3. Sex[2] = {‘M’,’F’}
Module for Census:
1. FOR loop1=1 -> n
1.1 IF Data[4][loop1] = State[index1]
1.2 Print State[index1]
1.3 FOR loop2= 1 -> n
1.3.1 Index2 = 0
1.3.2 IF Data[1][loop2] = Sex[index2]
1.3.3 Print Sex[loop2]
1.3.4 FOR loop3= 1 -> n
1.3.4.1 SWITCH Data[7][loop3]
1.3.4.1.1 CASE 1 : Hindu++
1.3.4.1.2 CASE 2: Muslim++
1.3.4.1.3 CASE 3: Christian++
1.3.4.1.4 CASE 9: Others++
1.3.5 Print Hindu, Muslim, Christian, Others
1.3.6 index2++
1.4 index1++
Main() function:
1. Begin
2. GOTO AcceptValues
3. GOTO Census
4. End program
tyet
#include
int factorial(int n)
{
int res=1;
int count;
for(count=1;count<=n;count++)
{
res=res*count;
}
printf("%d",res);
return res;
}
int main()
{
int f,res;
scanf("%d",&f);
res=factorial(f);
printf("%d",res);
}
its amazing.....
plz add data structure programs.................. thanks
Suppose we need to collect statistics of student’s marks in C programming language course. Write down a program that will read 15 students number and will print their grade distribution (i.e., how many got A grade, how many got B grade etc.). The marks of 15 students will be input to your program. Use a one dimensional array to store marks; assume all marks are integers. Also use another one dimensional array to store the statistics about grades. For example, the number of students getting A grade will be stored at index 0, the number of students getting B grade will be stored at index 1 and so on. What will be the size of that array?
The chart for grade calculation is as follows:
Marks Grade
=========== ============
90 – 100 A
80 – 89 B
70 – 79 C
60 – 69 D
< 60 F
The English Premier League (EPL) is the main sporting event in England each year. The game is
called Soccer in Australia because we play 4 different types of football; however, most of the world
simply refer to the game as Football. The Premier League has lost the source code for the program
that reports the current table of team standings. Normally, this would not cause problems because
the compiled program will continue to work until the end of the current season, whereupon it can be
replaced.
However, there is a need to report on the relative positions of the teams just including the results
from late September or October onwards on a month by month basis (or maybe two months at a
time), so clubs can know which Managers possibly need to be replaced – something that happens
regularly when a team is underperforming. So, the program needs to be re-written in its simplest
possible form to supply this information. The program will just use simple text files for input.
You will need to write a program that allows the league to feed in a simple text file of individual
match results and produce lists that are ordered alphabetically, as well as, in team performance
order.
For the Premier League, we will use shortened team names. There are 20 teams. ?
can anyone tell me source code ?
mail me - soumyajeetkhuntia@gmail.com
This programming this is very very useful for any programmer. thanks thanks a lots... keep it up. Please try to show background of any programming and show more details. This is very good effort.
hi please answer this program
the program can display like this
1
2 3
4 5 6
7 8 9 10
6 5 4
3 2
1
writea c programe to search whether given element is found in array using functions
#include
#include
void main()
{
int i,j;
clrscr();
for(i=9;i>=1;i=i-2)
{
for(j=i;j<=9;j=j+2)
{
printf(" %d ",j);
}
printf("\n");
}
getch();
}
void main()
{
int n=5,a[]={3,9,12,15,18};
for(int i=0;i10)
break;
else
printf("%d",a[i]);
}
}
In the above code what will be the output?
can anyone please explain me the use of break statement in c?
it is use in ternary operator.....
this site is really awesome ........thanks for providing this site .........this site helped me a lot for my c language exam......!
program to check prime number r not?if not find the nearest prime number?if input is 7:it is prime number
if input is 9:nearest prime is 7,11
Need help!!
Create a program called cashier.cpp.
Part 2. The Cashier Module
You are ready to add some of the point-of-sale functionality to your program. Currently, the cashier.cpp program displays a simulated sales slip without any sale information. Modify this program so that prior to displaying the simulated sales slip, it asks for the following data:
• The date. Expect the user to enter a date in the form MM/DD/YY. This should be entered as a string and stored in a string object variable.
• The quantity of the book being purchased: Store this number in an integer variable.
• The ISBN number of the book being purchased. The ISBN number is a string that contains numbers and hyphens. Use a string object variable to store it.
• The title of the book. Store the book title in a string object variable.
• The unit price of the book. Store this number in a floating-point variable.
Thank You
can any happen to know a program in c++ which check largest number in a column of a matrix
Write a program to create an array for 10 numbers where the value
for 10 numbers are given by user and find out the location of given
number in array. If location was found then display “Location of
is :< answer >” else display “Element was not present”.
[NOTE: Create User define function for Find location]
Write a program to create an array for 10 numbers where the value
for 10 numbers are given by user and find out the location of given
number in array. If location was found then display “Location of
is :< answer >” else display “Element was not present”.
[NOTE: Create User define function for Find location]
HOW ABOUT HEXADECIMAL TO OCATAL? PLS HELP
//Hi gokila. I send you the answer, Good luck//
//Author: Michael Nesher//
#include
char *RemoveWS(char *);
int main()
{
char carr[] = "abc def ghj a aaa aa aaa";
char *p = RemoveWS(carr);
printf("%s",p);
return 1;
}
char *RemoveWS(char *ptr)
{
char *rPtr = ptr;
int i = 0,j = 0;
while(ptr[i])
{
if(ptr[i] == ' ')
for(j=i;ptr[j];j++)
ptr[j] = ptr[j+1];
else
i++;
}
return rPtr;
}
#include
char *RemoveWS(char *);
int main()
{
char carr[] = "abc def ghj a aaa aa aaa";
char *p = RemoveWS(carr);
printf("%s",p);
return 1;
}
char *RemoveWS(char *ptr)
{
char *rPtr = ptr;
int i = 0,j = 0;
while(ptr[i])
{
if(ptr[i] == ' ')
for(j=i;ptr[j];j++)
ptr[j] = ptr[j+1];
else
i++;
}
return rPtr;
}
how we merge two sorted array into third array in sorted order
really a good blog... Thanks for the special effort of your
hi please remove logical error in the program of finding upto n prime numbers ex.in n=7 then answer 2,3,5,7
#include
void prime(int);
void main()
{
int n;
printf("\nenter value of n");
scanf("\n%d",&n);
prime(n);
}
void prime(int n)
{
int i=2,j,f=0,k;
printf("\nprime number upto %d are\n",n);
while(i<=n)
{
f=0;
for(j=2;j<n;j++)
{
k=i%j;
if(k==0)
{
f=0;
}
else
{
f=1;
}
}
if(f==1)
{
printf("\t%d",i);
}
i++;
}
}
can you help me to solution this :Write a C++ program that computes the summation of the even numbers within the interval [1, 100] and the multiplication of the odd ones using for statement. The program must print the summation and the multiplication.
please tell me a program which prints the following output.
1
22
333
4444
55555
please send it to uppili.karthik@GMAIL.COM
i need ac program to accept question and output the answer/defination in any subject
A machine is purchased which will produce earning of Rs. 20000 per year while it lasts. The machine cost Rs. 120000 and will have a salvage value of Rs. 20000 when it is condemned. If the 12 percent per annum can be earned on alternative investments what should be the minimum life of the machine to make it a more attractive investement compared to alternative investements?
wap?
Post a Comment