15,551 Topics

Member Avatar for
Member Avatar for needhelpe

I need a program that repeatedly asks for a real number, and then rounds it and output the rounded number as an integer. and it stops asking for real numbers when input 3.14

Member Avatar for Dave Sinkula
-1
196
Member Avatar for jeeter19

I have been given an assignment where I have to create a small shell that the user will be able to enter in a path and 2 parameters. The shell must be able to process this input and run the program at the given path using execvp, and must also …

Member Avatar for Ancient Dragon
0
294
Member Avatar for riahc3

Hey I know gcc is problably the best natural complier for C but Im looking for a IDE. I cant use Visual Studio 2008 (which Id like to) as it uses it own compiler. I was using wx-dev (I believe it is called like that) and it is pretty good. …

Member Avatar for jeeter19
0
390
Member Avatar for hosh

Hi, can anyone help me to solve this problem? I have this code: [code=c] FILE *in; char i =fgetc(in); int perm=0; perm =atoi(&i); printf("%d\n", perm); [/code] if first character in my "in" file is 2, the output is 28; if ------------------------------- is 3, -------------- 38, and so on... any ideas …

Member Avatar for hosh
0
131
Member Avatar for Aakriti

How to pass array of pointers to structures using functions in C? #include<stdio.h> #define dept_count 3 struct employee { char name[20], post[20]; int emp_no; int basic_pay; }; void search( struct employee * , char , int ); void main() { struct employee *deptt[dept_count]; int i,j,emp_count[10],dep_srch; char emp_srch[20]; clrscr(); for(i = …

Member Avatar for Tom Gunn
0
247
Member Avatar for seo2005

I am a beginner in c and would like someone tp help me . My question is why I have to write void before main to execute the c program. #include<stdio.h> void main() clrscr(); { printf("Hello") } This is a very simple program. But I am unable to execute it …

Member Avatar for tux4life
-1
181
Member Avatar for 50701735

please tell me about some my questions. if (we have a pointer *tmp)-> that my goal is assign that pointer for another pointer ** temp ; so ,how do we assign for right sytax.

Member Avatar for dkalita
0
74
Member Avatar for mauryoung

#include <stdio.h> int main() { int age; printf("Please enter your age:"); scanf("%d", &age); if(age<100) { printf("You are pretty young!!!\n"); } else{ if(age==100) { printf("You are old\n"); } else { if(age>100) { printf("You are really old\n"); } } } getchar(); return 0; } the program just flashes wen i click run …

Member Avatar for mythilisrini
0
176
Member Avatar for comput

*Forgive the double post (in Computer Science thread too. As soon as I figure out which thread this should be in, I will be sure to consolidate and delete one.* I got this example in a handout in class, but am having trouble following...can someone kindly insert some comments? After …

Member Avatar for dkalita
0
1K
Member Avatar for darkw1sh

I am having a small issue I have to use only putchar and get char to get an operator and two numbers and print the format into num1 (operator) num2 I have a lot of code but I am afraid to post on the site because someone might steal it …

Member Avatar for darkw1sh
0
146
Member Avatar for logan59102

Here is my assignment: Write a C program that will reserve seats on an airplane that has 10 first class seats and 100 coach seats. Your program should be menu driven. If a seat of the desired type is available, your program should recored the reservation and display the seat …

Member Avatar for Beg.CProgrammer
0
348
Member Avatar for praya.k

I need a c program to implement evaluation of arithmetic expressions using stack with its output

Member Avatar for WaltP
0
39
Member Avatar for WethiL

Purpose of this program take base and two number then multiply that numbers in that base.I used Dev-c Shed compiler for gcc.It takes the numbers and base from text in the attachment.Please help....It doesnt have syntax error but it has logic error... [code=c] #include <stdio.h> #include <math.h> #include <malloc.h> #include …

Member Avatar for Dave Sinkula
0
111
Member Avatar for sudhansugupta
Member Avatar for briane010
3
160
Member Avatar for claire89

For example i have a stack of chars and i want to pop a word from the stack how do i know whem the word starts and ends inside a stack? I have a program who separates words and i want to eliminate the word from the stack thats repeated …

Member Avatar for MrNoob
0
93
Member Avatar for adobea

i need help with the code below. it doesn't give out the right output. the output is supposed to appear in a symbol table form #include<stdio.h> #include<stdlib.h> #include<string.h> #include<conio.h> struct instruction { char iden[10]; char name[10]; }in; void main() { FILE *fin,*fesym; int v1,v2,val,*cslth,val1,val2,c,d; char *id1,*id2,name2[10],v[10]; int csaddr=0,progaddr,temp1; clrscr(); fin=fopen("pass1.c","r"); …

Member Avatar for MrNoob
0
124
Member Avatar for Hoey33

If a person has a number between 1 and 100 in mind, you can always figure out what this number is by asking no more than 7 questions “Is your number the same, smaller than or equal to x?” where x is to be determined. The trick is to a …

Member Avatar for MrNoob
0
123
Member Avatar for MrNoob

hey i was reading some stuff about windows i was wondering if file is loaded at virtual memory and let's say we load many files at once wouldn't that cause thrashing ? or exucatables are loaded into RAM then copied to virtual memory of hdd ?

Member Avatar for MrNoob
0
157
Member Avatar for dragonbone

HI , I am a student in an university... I am assigned a project about the knight's tour on the chess , but must use the Warnsdorff's rule ... rule : Put a knight on the chess with any square , and find all patchs of knight (knight pass each …

Member Avatar for neithan
-1
131
Member Avatar for sima786

i wanted a c program for aztec ecg data compression technique....plz i require it in 1 day...

Member Avatar for SecurExpert
-2
93
Member Avatar for largedimples

Will someone please check this and tell me if I did this problem correctly. The question is presented bold; I also need help with push. I couldn't figure out how to complete the definition or routine for it. I am not very good at big o notation to determine if …

Member Avatar for Tom Gunn
0
780
Member Avatar for Dazaa

Hi, I am writing a reverse function, to reverse a string, but when I am compiling I am getting an error, and I know its from the malloc line of code. This is the first time i have used malloc, but I want the function to work for any length …

Member Avatar for Dave Sinkula
0
144
Member Avatar for Kandeep

Hi! how do you get this output? Income for the current pay period : -24 **Value must be greater than 0.0 **Try again. : 24.. **Trailing character encountered **Try again. : 24 When it gets a value higher than 0 it ends the program i typed the few codes for …

Member Avatar for Dave Sinkula
-1
82
Member Avatar for StaticX

Hi, I am trying to write a simple program that stores a user input in a c-string,and will then print out each character (I)diaganolly across screen and (II) each character on a new line. The problem im having with this,and with c strings entirely,is that it keeps printing out random …

Member Avatar for StaticX
0
109
Member Avatar for arasucute

give me the perfect program like that output.[code]#include<stdio.h> #include<conio.h> void main() { int i,j; int a=15; int b=30; clrscr(); for(i=0;i<=a;i++) { for(j=0;j<=b;j++) { if(i==0||i==2||i==a) { if(i==0||i==2) if(j==0||j==b-4||j==b) printf("+"); else printf("-"); if(i==a) if(j==0||j==b) printf("+"); else printf("-"); { if(i==1||j==14) printf("mywindow"); if(i==1||j==28) printf("X"); } } if(j==0) if(i==1||i==3||i==4||i==5||i==6||i==7||i==8||i==9||i==10||i==11||i==12||i==13||i==14) printf("|"); else printf(" "); if(j==b) if(i==1||i==3||i==4||i==5||i==6||i==7||i==8||i==9||i==10||i==11||i==12||i==13||i==14) …

Member Avatar for yellowSnow
0
98
Member Avatar for hangulagerson

1. Write a program to implement a static circular queue. It should include the following functions: i) Enqueue – To add an element to the end of the queue [4] ii) Dequeue – To remove an element from the front of the queue [4] iii) IsEmpty – To check whether …

Member Avatar for yellowSnow
0
111
Member Avatar for chescarleta18

#include<stdio.h> #include<string.h> main() { char STR1[100]; int i; clrscr(); printf("Please input a STRING.\n"); gets (STR1); printf("\n%s is displayed in reverse form as:\n",STR1); for(i=strlen(STR1)-1; i>=0 ; i--) { printf("%c",STR1[i]); } getch(); }

Member Avatar for chescarleta18
0
186
Member Avatar for richkid

Hey guys, I have just written C program that calculates the force of a body using F = ma but there is some sort of problem occuring , could you please help me fix the error.

Member Avatar for chescarleta18
0
98
Member Avatar for AnkhUNC

So I've got an assignment for class. The point is to read in characters to a string. If there are 7, print the 7. If there are 10, print the 10. Less than or more than, print an error. It is also supposed to convert keyboard characters into their associated …

Member Avatar for AnkhUNC
0
94
Member Avatar for banders7

Displays which partitions are on which physical hard drives and shows partition starting offset and length. Developed and tested under XP using a Borland C++ compiler. Code is not provided for the private includes, but changes to make to code work are trival. References to werrtxt() and format() can be …

0
501

The End.