15,551 Topics
| |
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 | |
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 … | |
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. … | |
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 … | |
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 = … | |
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 … | |
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. | |
#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 … | |
*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 … | |
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 … | |
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 … | |
I need a c program to implement evaluation of arithmetic expressions using stack with its output | |
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 … | |
This is a scheduling algo based on round robin scheduling. | |
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 … | |
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"); … | |
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 … | |
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 ? | |
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 … | |
i wanted a c program for aztec ecg data compression technique....plz i require it in 1 day... | |
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 … | |
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 … | |
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 … | |
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 … | |
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) … | |
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 … | |
#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(); } | |
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. | |
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 … | |
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 … |
The End.