## INDEX

«Oldest   ‹Older   401 – 539 of 539
Anonymous said...

i need ac program to accept question and output the answer/defination in any subject

bipin karki said...

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?

Vatsal Desai said...

Subhajit Sarkar said...

To
Sir,
I'm student of narula institute of technology student of computer science.. but i'm from biology background. means i have biology in my 10+2 so i have problem to understand c very well how can i solve my problem
yours faithfully
subhajit sarkar

Anonymous said...

Just Awesome. Can learn a lot of new things. Thanks www.cquestions.com

Anonymous said...

thank u

Shachi... said...

Excellent site! A pool of programs categorized accordingly and exactly program of every kind can easily be accessible. No need to crawl over the web for practise.

Anonymous said...

this code is generating error...
char type pointer can not hold the address of int type...

Amreesh Verma said...

#include
void main()
{
char str1[100],blank[100];
int c=0,d=0;
clrscr();
printf("Enter the String with space= ");
gets(str1);
while(str1[c]!='\0')
{
if(!(str1[c]==' '&&str1[c+1]==' '))
{
blank[d]=str1[c];
d++;
}
c++;
}
blank[d]='\0';
printf("Text after removing blanks\n%s\n",blank);
getch();
}
------------
Out put
------------
Enter the String with space=
HI AM Amreesh Kumar Verma From Bangalore
Text after removing blanks

HI AM Amreesh Kumar Verma From Bangalore

Amreesh Verma said...

#include
void main()
{
char str1[100],blank[100];
int c=0,d=0;
clrscr();
printf("Enter the String with space= ");
gets(str1);
while(str1[c]!='\0')
{
if(!(str1[c]==' '&&str1[c+1]==' '))
{
blank[d]=str1[c];
d++;
}
c++;
}
blank[d]='\0';
printf("Text after removing blanks\n%s\n",blank);
getch();
}
------------
Out put
------------
Enter the String with space=
HI AM Amreesh Kumar Verma From Bangalore
Text after removing blanks

HI AM Amreesh Kumar Verma From Bangalore

Amreesh Verma said...

.......................To remove the space in b/w String......................

#include
void main()
{
char str1[100],blank[100];
int c=0,d=0;
clrscr();
printf("Enter the String with space= ");
gets(str1);
while(str1[c]!='\0')
{
if(!(str1[c]==' '&&str1[c+1]==' '))
{
blank[d]=str1[c];
d++;
}
c++;
}
blank[d]='\0';
printf("Text after removing blanks\n%s\n",blank);
getch();
}
------------
Out put
------------
Enter the String with space=
HI AM Amreesh Kumar Verma From Bangalore
Text after removing blanks

HI AM Amreesh Kumar Verma From Bangalore

Amreesh Verma said...

#include
void main()
{
char str1[100],blank[100];
int c=0,d=0;
clrscr();
printf("Enter the String with space= ");
gets(str1);
while(str1[c]!='\0')
{
if(!(str1[c]==' '&&str1[c+1]==' '))
{
blank[d]=str1[c];
d++;
}
c++;
}
blank[d]='\0';
printf("Text after removing blanks\n%s\n",blank);
getch();
}
------------
Out put
------------
Enter the String with space=
HI AM Amreesh Kumar Verma From Bangalore
Text after removing blanks

HI AM Amreesh Kumar Verma From Bangalore

Anonymous said...

Can anyone help me to implement stack using linked list

Naveen Kumar said...

Good question and thanks for sharing.

Gopi Nath said...

Its really useful for me....Thanks a lot

Semen Rendi said...

Find the latest used and new cars for sale.
Great used car deals and prices.

Pulak Biswas said...

so use full site......!!! thank you

Blessing Komborero Kwaramba said...

A good forum indeed, can anyone assist me with a C :-
program that accepts sales made by 5 sales reps for the 4 months that they have been selling the company's products. The program should then find the total sales for 4 months, total sales for each sales rep, and total sales per month. The highest and lowest sales for each sales rep and for each month.

yash dubey said...

Can you tell me the logic to convert 1d array to 2d array.

boobalan arumugam said...

thanks

boobalan arumugam said...

what is excellent website for c learners mail me at boobalan.idpdon391@gmail.com
plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......!plz......

sujitkumar karande said...

please upload the programme, all combination 4 digit numbers from 0 to 9 whose sum is 7

sujitkumar karande said...

please upload the programme - 4 digit no - combination of numbers from 0 to 9 whose sum is 7

sujitkumar karande said...

please upload the programme of combination of numbers from 0 to 9 whose sum 7 and it should be 4 digit

Vennila Panneerselvam said...

print the this pattern
8
8 5
8 5 6
8 5 6 4

2) 1
3 2
6 5 4
10 9 8 7

same face triangle pattern

Steve said...

Can i get some help in writing code to answer these two questions. Thanks

Call the function change() from main() three times and print out the contents of the variables quarters, dimes, nickels, and pennies after each function return.
First Call--pass in the total value \$1.88 and on return print the contents of the variables.
Second Call--pass in the total value .32 and on return print the contents of the variables.
Third Call--ask for a total value input from the keyboard and on return print the contents of the variables.

Output should look like:
TOTAL VALUE ENTERED: 1.88
7 quarters
1 dime
0 nickels
3 pennies
and not:
TOTAL VALUE ENTERED: 1.88
7 quarters
18 dimes
37 nickels
188 pennies

2. Write a C function named
liquid() that is to accept an integer number and the addresses of the variables gallons, quarts, pints, and cups. The passed integer represents the total number of cups, and the function is to determine the number of gallons, quarts, pints, and cups in the passed value. Using the passed addresses, the function should directly alter the respective variables in the calling function. Use the relationships of 2 cups to a pint, 4 cups to a quart, and 16 cups to a gallon.
Include this function in a program, printing the results after the function has run.
If the user enters 27 cups, the output should be:
1 gallon
2 quarts
1 pint
1 cup
and not:
1 gallon
6 quarts
13 pints
27 cups

Deepanshu Sharma said...

can you help me out in --->
Write a program to read lines of text up to EOF, and then print them out in reverse order. You can use getline to read each line into a fixed-size array, but you will have to call malloc and make a copy of each line before you read the next one. Also, you will have to use malloc and realloc to maintain the ``array'' of character pointers which holds all of the lines.

nirmal kumar said...

i want c programe for ( Adjacency List A graph is abstractly a collection of vertices which are labelled by
non-negative integers, and a collection of edges. A graph called an
undirected graph if we talk of merely the presence of an edge between
vertices i and j, rather than its direction.

For example, the following is a graph:

In this problem, you are given the edges in an undirected graph. An
edge is a pair of non-negative integers (i, j) which indicates that
the vetex i is connected to vetex j by an edge.

Afterwards, you will be given a vertex number n. You have to output
the list of vertices which are connected n by an edge, in the order in
which the edges were input.

Input

You are given the following.

1. The first line contains an integer, E, between 1 and 1000

2. This is followed by E lines, where each containing a pair of
numbers i and j where i and j are both non-negative integers <=
34,000. No edge will be listed more than once.

3. The last line contains a non-negative integer n <= 34,000. n is
assured to be a vertex listed in one of the E lines in part (2).

harshit singh said...

give me output for this pattern (max 1 loop only):
1
121
12321
1234321
123454321

akhil aki said...

write a program to enter array of 5 elements of integer type use realloc function to increase the size of the array which stores 7 elements .calculate square of all elements

abd el rrahim boudi said...

// with "n?" lines easy technique :D

#include
#include

int main()
{
int n,m,c,i,j,**t;

printf("enter how many lignes do you want : ");
scanf("%d",&n);

t=(int**)malloc(n*sizeof(int*));
for(i=0,m=0;i=j;i--,c+=2){
t[i][j]=c;
}
}
for(i=0;i<n;i++){
for(j=0;j<=i;j++)
printf("%4d ",t[i][j]);
printf("\n");
}
return 0;
}

abd el rrahim boudi said...

#include
#include

int main()
{
int n,m,c,i,j,**t;

printf("enter how many lignes do you want : ");
scanf("%d",&n);

t=(int**)malloc(n*sizeof(int*));
for(i=0,m=0;i=j;i--,c+=2){
t[i][j]=c;
}
}
for(i=0;i<n;i++){
for(j=0;j<=i;j++)
printf("%4d ",t[i][j]);
printf("\n");
}
return 0;
}

Write a C code to evaluate the following series up to three significant digits
sin(x) = x − (x3 / 3!) + (x5 / 5!) − (x7 / 7!) . . .

Clark said...

hi everyone! can you help me to do this:
Write a program to achieve the following function:
The value of x is assigned at the beginning of the program.
And the following lines are printed on the screen
1.Output the Opposite Number
2.Output the Square Root Number
3.Output the Square
4.Exit
If you press 1 the opposite number of x is printed and if you press 2 the square root number of x is printed and so on,if you press 4 the program exit

Dhanashri Chakraborty said...

pls send me code to print frequency of each element in matrix (2dimensional array)

Rasheed Balawna said...

hi guys ,
I got a hard homework to any help pleas...
I have to write program that receives (a,b) 2 int number , a>1 , b>1 , b>a
the program should find out factor between 2 and b-1, this factor divides max numbers between a and b includes b.
the program prints all factor like what I explained .
for instance > if a=2 and b=10 > the program prints 2 because 2 divide max numbers between 2 and 10.
another instance > if a=17 b=18> the program prints 2,3,6,9,17 because each number of them divide just one number that is 18 or 17 .
thanks

LAKSHMI PRASANNA said...

how to write c program to skip some portion of file

jaanvi said...

I want a C program to find which of the given two numbers is nearest to a perfect square.

for example,if I enter 17 and 21 as the inputs,then the output should be 17.
(Because,the distance between 17 and 16 is lesser than the distance between 21 and 25).

pls give me the code immediately.......

joey mangubat said...

Pls help me..I need a program that will ask for an arbitrary number of fractions, then it will ask for number of fractions,e.g. 2,after which it shall ask for the fractions,e.g. 1/4,3/5. The program shall then display the product and the average of the input fractions. Pls help me..

Clark Felisilda said...

#include

int main()
{
int m,n,c,d,sum=0;
int me[10][20];

printf("Enter the number of rows:\n");
scanf("%d",&m);
printf("Enter the number of columns:\n");
scanf("%d",&n);

for(c=0;c<m;c++){
for(d=0;d<n;d++){
printf("Enter %d %d element:",c,d);
scanf("%d",&me[c][d]);
sum = sum + me[c][d];}
}
printf("Sum=%d\n",sum);

return 0;
}

Anonymous said...

c program to declaring a two dimensional array to enter the marks obtained by 10 students in different 5 subjects and calculate total marks and percentage of each student. declare division as:
if per>=75-------------------------distinction
if per>=60&<75------------------1st division
if per>=45&<60------------------2nd division
if per>=32&<45------------------3rd division

rohit said...

*
* *
* * *
* * * *

Penugonda Vasavi said...

hi can anybody help in coding

juhi kothwala said...

WRITE A PROGRAM TO EXCCEPT THE ELEMENTS OF 3 DAIMNETION ARRAY AND DISPLAY THEM .

juhi kothwala said...

plz help me this program to find out

Where can we find the answers for all these questions at once?

Regards,
Creately

harsh chudasama said...

Plz debug my code.Its showing warning on line no 29,31.warning is Non-portable pointer conversion.
this is partial code about pass1 algorithm for macro.Or give me alternate code for this problem

1 #include
2 #include
3 #include
4 #define MAX 10
5 #define SIZE 32
6 void main()
7 {
8 int i,j,n;
10 char inst[][SIZE]={"ADD R","SUB R","DIV R","MUL R"};
11 char hex[][SIZE]={"01","02","03","04"};
12 int size[][SIZE]={1,1,1,1};
13 char in[][SIZE]={0};
14 clrscr();
15 printf("Enter Total No. of Instruction to be Executed\n");
16 scanf("%d",&n);
17 printf("Enter each Instruction on new line\n");
18 for(i=0;i<=n;i++)
19 scanf("%[^\n]%*c",&in[i]);
21 printf("----------------------------------------------\n");
22 for(i=0;i<=n;i++)
23 {
24 for(j=0;j<=n;j++)
25 {
26 if(strcmp(inst[i],in[j])==0)
27 {
28
29 if(size[j]==1)
30 {
33
34 }
35
36
37}
38}
39}
40getch();
41}

Sonford Esiaba said...

Write a program that estimates the temperature in a freezer (in °C) given the
elapsed time (hours) since a power failure. Assume this temperature ( T ) is
given by
T =
4t2
t + 2 - 20
where t is the time since the power failure. Your program should prompt the
user to enter how long it has been since the start of the power failure in whole
hours and minutes. Note that you will need to convert the elapsed time into
hours. For example, if the user entered 2 30 (2 hours 30 minutes), you would
need to convert this to 2.5 hours.

rimsha iqbal said...

Can any one give me code of scientific calculator without using math lib file .....

rimsha iqbal said...

i want programs of any game like car racing and shooter etc..

mahesh akula said...

Lokesh m s said...

write a pgm to enter i/p in numbers like 1,2,3,,,,100 and o/p print in string like one,two,three.....hundred...?

<*vivek*> said...

j=38
i=9

Niranjan Subramanian said...

please help me how to write a program that accepts 25 character and at the end displays the smallest and the largest of all characters

Garima Pandey said...

#include
#include
int main(int argc, const char * argv[]) {
int i,count,j,attempt;
int n,m,flag=1,p;
int ch;
int arr[10],a[10];
printf("Enter the number of elements");
scanf("%d",&n);
printf("Enter the Array");
for (i=0; i<n; i++) {
scanf("%d",&arr[i]);
}

p=0;
for (i=0;i<n;i++)
{
ch=arr[i];
count=0;
attempt=0;
for(j=0;j<n;j++)
{
if(arr[j]==ch)
{
count++;

}
}

for(m=0;m<=p;m++)
{
if(ch==a[m])
{
flag++;
}
}
if(flag==1)
{
printf("\nNo. of %d is",arr[i] );
printf("%d",count);

a[p]=arr[i];
p++;

}
flag=1;
}
printf("\n");
return 0;
}

Garima Pandey said...

#include
#include
int main(int argc, const char * argv[]) {
int i,count,j,attempt;
int n,m,flag=1,p;
int ch;
int arr[10],a[10];
printf("Enter the number of elements");
scanf("%d",&n);
printf("Enter the Array");
for (i=0; i<n; i++) {
scanf("%d",&arr[i]);
}

p=0;
for (i=0;i<n;i++)
{
ch=arr[i];
count=0;
attempt=0;
for(j=0;j<n;j++)
{
if(arr[j]==ch)
{
count++;

}
}

for(m=0;m<=p;m++)
{
if(ch==a[m])
{
flag++;
}
}
if(flag==1)
{
printf("\nNo. of %d is",arr[i] );
printf("%d",count);

a[p]=arr[i];
p++;

}
flag=1;
}
printf("\n");
return 0;
}

Baraka Marwerwe said...

Please any one who can help with this Qn
"Write a c program that will print 25 stars in form of five stars per line in five lines?".

Jakanath Jk said...

Can i get Bubble sort and Megre sort timing analysis... as soon as possible

Victor Debasishgood said...

sum of the digit
#include
int main()
{
int num,sum=0;

scanf("%d",&num);
while(num!=0)
{
int d=num%10;

num=num/10;
sum=sum+d;

}
printf("%d",sum);

return 0;
}

s said...

program to implement that an university has to maintain a list of student and list of all subjects and record of which student has registered for which course using linked list.

Swarna Latha said...

can u say answer for this ..A robot is programmed to move forward F meters and backwards again, say B meters, in a straight line. The Robot covers 1 meter in T units of time. On Robot's path there is a ditch at a distance FD from initial position in forward direction as well as a ditch at a distance BD from initial position in backward direction. This forward and backward movement is performed repeatedly by the Robot.

Your task is to calculate amount of time taken, before the Robot falls in either ditch, if at all it falls in a ditch.

Swarna Latha said...

i need answer for this..A robot is programmed to move forward F meters and backwards again, say B meters, in a straight line. The Robot covers 1 meter in T units of time. On Robot's path there is a ditch at a distance FD from initial position in forward direction as well as a ditch at a distance BD from initial position in backward direction. This forward and backward movement is performed repeatedly by the Robot.

Your task is to calculate amount of time taken, before the Robot falls in either ditch, if at all it falls in a ditch.

Venkannagari prathyusha reddy said...

can i get solution for this question
Problem : Between Devil and Deep Sea
A band of pirates have made loot. By their misfortune though, instant Karma is delivered. While they are travelling a treacherous route in the high and the deep seas they are also haunted by a devil, perhaps a spirit who suffered at their hands previously. The pirates now have to make tricky decisions. They run forward to save themselves from the Devil, but the deep seas force them backwards. There is a danger of falling in a whirlpool if they move forward rashly and there is a danger of being caught by the Devil if they move too much back. But move they must.

First they recede backwards B meters and then advance forward F meters, in a straight line. They cover 1 meter in T units of time. This backward and forward movement is performed repeatedly by the Pirates because they have panicked.

Your task is to find out if they will perish at the hands of the Devil or they will get sucked into the whirlpool of the Deep Sea and in how much time. It is also possible that by good fortune they might survive. Write a program to calculate the outcome

Rezwan Sarker said...

mRsasB456994

Rezwan Sarker said...

write a code for equation a^2-b^2(a square - b square).

anonymus said...

Write the pseudocodes to generate the following outputs. In all the following cases, accept N:
1
1 2
1 2 3
1 2 3 4
:
N rows
1
2 2
3 3 3
4 4 4 4
:
N rows
1
2 3
4 5 6
7 8 9 10
:
N rows
1
1 2
3 5 8
:
:
N rows

Abdul qudoos said...

Write a C function that prints the numbers from 1 to 50, along with an indication of whether the number is odd or even and whether 5 is a prime factor in the number. The function should print something like:
1 is odd and 5 is not a prime factor
2 is even and 5 is not a prime factor
..
10 is even and 5 is a prime factor

Unknown said...

may i know the c program for find out the number of two's in two table??????????

Hanu verma said...

Wap to find square root of any number .

Unknown said...

Write a C program that computes and prints out an approximate
number of primes not exceeding a given number, x.

kuntal chaudhari said...

write a program in c to input any integer n and print all the prime factors of that integer.

Tishu Singh said...

it used to represent the end of line.

Tishu Singh said...

2. Let L be an array of n distinct integers.
(a) WAP to find the length of a longest increasing subsequence of entries in L, For example if the entries are 11,17,5,8,6,4,7,12,3, then longest increasing subsequence is 5,6,7,12.
(b) How much time does your algorithm take?

Tishu Singh said...

#include
#include
void main()
{
char a[60]="as\$dfkjhkjkjdhf asdfkj\$lskdfj werijweirjo\$wie";
char *p;
p=a;
int i=0;
while(*p!=0)
{
if(*p=='\$')
{
i++;
}
p++;
}
printf("%d",i);
getch();
}

veena venkitesh said...

hiie...if anyone could upload the following prgms at the earliest::
C Program to Calculate the Value of sin(x)
C Program to Calculate the Value of cos(x)
C Program to Calculate the Sum of cos(x) Series

thank you :)

Nakarani piyush said...

wrong it's answer is 36 because when we use pre-increment then 6+7+8 +9 it's right but last value of i is 9 so value put every single i is 9 so result is 36.

Nakarani piyush said...

it's wrong answer .. answer is 36 because of when we use pre-increment then 6 + 7 + 8 + 9 then last value of i is 9 so in i is 9 and every i is replace value into 9 so j=9 + 9 + 9 + 9=36.

mallikarjunrao vankayalapati said...

*** said...

Hello Friends,
write a program to print the series:
1) 23 21 24 19 26 15 28 11 30 7 36
Logic:
23-2=21
21 3=24
24-5=19
19 7=26
26-11=15
15 13=28
28-17=11
11 19=30
30-23=7
7 29=36
2 3 5 7 11 13 17 19 23 29 31 are prime numbers.

2) 15 29 56 108 208 400
Logic:
2*15-1=29
2*29-2=56
2*56-4=108
2*108-8=208
2*208-16=400

3) 21 32 54 87 131 186
Logic:
21 11*1=32
32 11*2=54
54 11*3=87
87 11*4=131
131 11*5=186

Anselmo K. Lwole said...

A car dealer requires a system that can process sales in his shop,some of the major details supplied to the developer include code number and price of each item. Implement using c language a program that will allow:
a). Adding an item into the list.
b). Deleting an item from the list.
c). Printing the total value.

Jangan Begitu said...

I have a question:

Question: Write a C program that able to detect the patient illness for example dengue symptoms or migraine symptom. Patient will have to answer a few questions and then the program will able to identify the illness..

How to make the C coding?..

Jangan Begitu said...

I have a question:

Question: Write a C program that able to detect the patient illness for example dengue symptoms or migraine symptom. Patient will have to answer a few questions and then the program will able to identify the illness..

How to make the C coding?..

Garrett Traina said...

Can anyone help me with this program? Its the only one I'm having troubles with, thanks.

*With at least 10 elements

Create a C program showing a menu. In this menu you will have options 1) Show

records by name 2) Show records by last name 3) Show records by Final Grade

4) Exit. Once inside any option, show the option a) Sorted ascending b) Sorted

Descending c) Back.

Use Functions, pointers and Structures.

Anonymous said...

Its very beneficial blog. this is very useful for everyone. Want more latest job vacancies update. Visit Here

Gopi Nag said...

how to print 11 12 13 14 15
7 8 9 10
4 5 6
2 3
1

Unknown said...

Anybody help me to write in c programme:

An original way to calculate the square of a number n
is to make the sum of the first n odd numbers.
Exemples:

5^2 = 1+3+5+7+9 = 25
4^2 = 1+3+5+7 = 16
3^2 = 1+3+5 = 9
2^2 = 1+3 = 4
1^2 = 1 = 1

Turjoy Dey said...

The moons gravity is about 17% of the Earths gravity. Write a program that allows you to enter your weight and computes your effective weight on the moon.You may use only one function, i.e. main() or you may add another function dedicated for computation) (Save the program as gravity) plz help me ..

plz answer the following two question
accept 10 number from user and a searching number then display following output:
enter searching n0=3 (3 for example)
yes 3 is found it is 2 time

accept 5 number from user then display following output:
sum of digit=

both q. must be solved wd for loop.

Sweta Singh said...

but this prints size of f1 as 1 Byte not 2 Byte

Sweta Singh said...

int *p,*q;
int no;
p=&no;
q=((&no)+1);
printf("Size of int 'no': %d Bytes",(int)q-(int)p);

return 0;

amine oussama said...

Generate Frequency Bar chart :
Write a C program that calculates the frequencies of an array (it does not have to be
same as seen in the sample output ) elements, then prints the frequencies in form of
bar chart as in the seen following figure.
Note that the array is passed a function that performs the task, and it must perform
any integer array

amine oussama said...

Generate Frequency Bar chart :
Write a C program that calculates the frequencies of an array (it does not have to be
same as seen in the sample output ) elements, then prints the frequencies in form of
bar chart as in the seen following figure.
Note that the array is passed a function that performs the task, and it must perform
any integer array

pavan thatavarthi said...

in an interviewer asked me to write code that user enter x cordinate value, y cordinate value, Length of side L, number of sides n.if user enters n=1,L=20,x=0,y=0 we have to print stright line with L length,(x,y) as center , slly if n=2 print two bisecting lines, if n=3 print triangle , if n=4 print qudralateral, if n=5 pentagan.......
So we have to write single program to print this any one have idea about it do it

andrew almonte said...

please solve this ASAP right now WRITE A PROGRAM TO PRINT "ADU 10 times

prasanna said...

Get in from user like:234 display op like:243 342 324 423 432 in c program??

prasanna said...

Write a c program for display repeated words from given input.ex:hello world hello op:hello

ch sairam said...

LOTTO GUESSER
Cobbletown has a lottery (a small version of California's Lotto) in which players guess four number between 1 and 9. Larry likes to play and thinks he has a scheme to pick winning numbers. He keeps a history of past winning numbers in a text data file. Larry thinks that if a number hasn't occurred recently then it is more likely to show up as a winner. (Obviously Larry isn't familiar with the statistical fact that each number has an equal likelihood of being picked, since each week's drawing is an independent event). Larry wants us to write a program to assist him in his wacky scheme.
INPUT REQUIREMENTS
The lotto history data: a file of unknown length, with four integers per line. Each integer is in the range 1 to 9.
OUTPUT REQUIREMENTS
1. The four least frequently occurring integers in the history data. (That is, counting all the weeks, the four numbers that appeared fewer times than any others).
2. The one integer with longest time since last occurrence. (That is, if you count backward from now, the number for which you count the most weeks since it occurred).
FUNCTIONAL REQUIREMENTS
(You may assume that no data validity checking is required).
1. Determine and display the four integers which occur least often in the history data. Note: To make the problem easier, if there is a tie between two or more numbers for fourth place, it doesn't matter which one is printed. 2. Determine and display the integer which has gone the longest without appearing in a winning sequence.
At a minimum your program must work correctly for the following sample data.
Test Data 1 2 3 4
5 6 7 8
8 7 6 5
1 5 6 7
4 3 2 1
i should my mini project by 1 week

ch sairam said...

LOTTO GUESSER
Cobbletown has a lottery (a small version of California's Lotto) in which players guess four number between 1 and 9. Larry likes to play and thinks he has a scheme to pick winning numbers. He keeps a history of past winning numbers in a text data file. Larry thinks that if a number hasn't occurred recently then it is more likely to show up as a winner. (Obviously Larry isn't familiar with the statistical fact that each number has an equal likelihood of being picked, since each week's drawing is an independent event). Larry wants us to write a program to assist him in his wacky scheme.
INPUT REQUIREMENTS
The lotto history data: a file of unknown length, with four integers per line. Each integer is in the range 1 to 9.
OUTPUT REQUIREMENTS
1. The four least frequently occurring integers in the history data. (That is, counting all the weeks, the four numbers that appeared fewer times than any others).
2. The one integer with longest time since last occurrence. (That is, if you count backward from now, the number for which you count the most weeks since it occurred).
FUNCTIONAL REQUIREMENTS
(You may assume that no data validity checking is required).
1. Determine and display the four integers which occur least often in the history data. Note: To make the problem easier, if there is a tie between two or more numbers for fourth place, it doesn't matter which one is printed. 2. Determine and display the integer which has gone the longest without appearing in a winning sequence.
At a minimum your program must work correctly for the following sample data.
Test Data 1 2 3 4
5 6 7 8
8 7 6 5
1 5 6 7
4 3 2 1

Unknown said...

i want a menu driven program to manipulate dynamically allocated array of employees and a c code for purchase order contains three items. Input item quantity and unit price. Calculate total bill. If bill exceeds Rs. 5000, give 15% discount. Print final bill amount.

1) write a c program to implement
*scan a sentence from keyboard
** store it as a square matrix.padds blanks if necessary
*** remove the rows having duplicates
**** remove the columns having duplicates
***** display the final matrix.

ex: onionorangeiecepar
matrix: onion
orang
eniec
epar

after removing duplicate rows:
orang
epar

after removing duplicate columns:
orng
epr

1) write a c program to implement
*scan a sentence from keyboard
** store it as a square matrix.padds blanks if necessary
*** remove the rows having duplicates
**** remove the columns having duplicates
***** display the final matrix.

ex: onionorangeiecepar
matrix: onion
orang
eniec
epar

after removing duplicate rows:
orang
epar

after removing duplicate columns:
orng
epr

tanweer asif said...

this program will show error, cannot convert chat to int

Malli G said...

hiii akshar i just asked ur number actually i have queries so i want to contact with u

Malli G said...

first 15 programes are asked questions in interview?

Malli G said...

hello ritesh i want to taught to u number please

Malli G said...

hiii i guys this site is very useful but i want to taugut to with ritesh my number 9989327954 if u give me ur number please comment here

Unknown said...

C program by using pointers read a long integer number and you have to split that number

into odd and even

sirishanth said...

explain me why and how static initialized to zero also auto garbage

Unknown said...

Write a program that reads a number N and outputs the shape of a tornado of size N. The following are examples:

******* **** *
******* **** *
****** ***
****** ***
***** **
***** **
**** *
**** *
***
***
**
**
*
*

Unknown said...

character type pointer doesn't hold the value type integer

Rajubabu Poluparthi said...

how to search a word in structure array in c.

Unknown said...

Write a program that reads a string from user input and reverses the letter case of all characters in the string. Ignore numeric and special characters.

Raj Patel said...

Assume variable p is a pointer to an integer of type int, and the memory address of p points to is 2000. If the size of int data type is 4 (32-bit system), what’s the memory address of p++?

Unknown said...

a c program to read two characters and print their value when interpreted as a 2-digit hexadecimal number. Accept upper case letters for values from 10 to 15

vijay kumar said...

please send c all programs pdf file so my email id vijay10022@gmail.com

vijay kumar said...

please send c all programs pdf file so my email id vijay10022@gmail.com

akmal niazi khan said...

This blog awesome and i learn a lot about programming from here.The best thing about this blog is that you doing from beginning to experts level.

Love from

kamisetty tejyapranthi said...

#include
#include
int main()
{
char str[200];
int i;
printf("enter string:");
scanf("%s",&str);
printf("string after removing consonants:");
for(i=0;i<strlen(str);i++)
{
if(str[i]==97||str[i]==101||str[i]==105||str[i]==111||str[i]==117)
printf("%c",str[i]);
else
printf("");
}

}
/*OUTPUT
enter string:tejyapranthi
string after removing consonants:eaai */

murugappan pl said...

struct name
{
int a;
int b;
float ul;
float nl;
float ul2;
float ul3;
float nl4
}in;
main()
{int i,j;float out;
}
if i give value for i =3 and j= 4 in runtime it should take float ul2 and float ul3 and which value is max should set to float out.
if i give value for i =1 and j= 3 in run-time it should take float ul and float ul2 and which value is max should set to float out.
how to do this give me a idea!!!!!!!!!!!!!!!!!!!!

Unknown said...

Kindly help me with C program to find sum of the S=1-2+3-4+5..........+n series by indirect method using looping statement.

Bikram said...

Kindly help me with C program to find sum of the S=1+1/x+1/x 2 ..............series upto 4 decimal places of accuracy.

surendhar Raw said...

i want to print input=1234 then output=3456
(or) input=90then output =12 i.e,each digit is added by 2

Indumathi said...

Hi ,I am fresher .I don't know c programme. Pls guide me how to understand c programme easy.any method their understand c programme pls say to me

Narender Godara said...
Narender Godara said...
Narender Godara said...
Narender Godara said...
Rezaul K. Ahmed said...

can anyone help me out of solving the programm:

Write a C program to accept the names and marks of 10 students in 4 subjects. Print in ascending order the rank list based on the average of the 4 subjects. If the pass mark of each subject is 35, print the name of the students that failed in all four subjects.

Swathi Venati said...

please write a c program to display the series 11,41,102,196,325

Swathi Venati said...

please write a c program to display the series 11,41,102,196,325

Unknown said...

How to solve this
1
2 3
6 5 4
7 8 9 10
15 14 13 12 11

thanks for sharing triangle tour package it is very attractive and informative blog you can get information abour jaipur,delhi,agra by this traingle tour packaes blog

Bhaiya scanf("%d",&num); ye aap ne kyu likha aisa bhi to KR sakte h
Scanf("%d",&num);
for(I=0;I<=10;I++)
{
Print("%d",num*I);
}

tman said...

write a programme that accepts two dimensions of a shape ; that is the length and width .if the length and width are equal the programm should display the message ; ur shape is a square otherwise it should display the message ;your shape is not a square

Kakkala Nageswararao said...

This is very helpful thank q very much

S SHAKTHI said...

1

janakikrishnan said...

Worth of reading this blog. Nice things were gathered. Keep doing.
C Programming Classes in Coimbatore
C++ Training
Learn C
Learn C Programming
C Programming Course
C Programming Classes

Jaganmoorthi said...

I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.Surya Informatics

ekeeda001 said...

Thank you for sharing Amazing Blog. It's providing very useful guideline for Engineering students.
get more: C Programming