15,551 Topics
| |
can u help me in my assignment on Turbo C ??? this is the questions .. i need it badly tom.. at 10am in the morning !! Write a program to print a customer bill for Ajax Auto Repair. the parts and labor changes are input and a 6% sale … | |
I am trying to compile my code and the error is in my ADT module .h file at this line: void printList(FILE* out, ListRef L); The precise error is "list.h:42: error: expected ‘)’ before ‘*’ token" Everything seems fine to me with the rest of the program but my compiler … | |
| |
can you guys help me out i dont know any of the c++ functions and i dont know how to convert this tnx in advance [CODE]#include <iostream> #include <stdlib.h> #include <fstream> using namespace std; struct student { char fname[100]; char lname[100]; int id; float cgpa; }; int add( student * … | |
Hey guys. I coded the following program below: but I have a problem... I think its perhaps the logic I have used is not too good... here it goes... The program below should: ask the user to enter a letter ('a' to 'z' or 'A' to 'Z') and outputs VOWEL … | |
hi its been 2 years since the last time i program in c and this is my first after 2 years. So i'm not that familiar anymore to the syntax in c(especially i'm already programming in java). So my problem is, i don't know if i did something syntactically wrong … | |
The goal of this program is to create a "bag" array and a function that will calculate the Fibonacci sequence. The "bag" array should be initialized to a size of 2 where the the elements in order are 0 and 1 respectively. For example: array[0] = 0 and array[1] = … | |
Hey im kinda new in file handling so can you guys help me out im having a hard time delete data from my .txt file the one here in my code workes but when I example [CODE] printf("Enter Record to be deleted: "); scanf("%s",del); if(strcmp(line, del) !=0) [/CODE] the data … | |
Hi ... i am doin my B.E in computer science amd i was asked to write a programme ... can anyone help me write a c program that can hang the system ... and can u also tel me how to set it right again...[B][COLOR="Green"]:icon_neutral:[/COLOR][/B] and can u tel me … | |
I've been playing around with recursion a little bit, admittedly it's been some time since I've used it, and I'm feeling pretty rusty. I was simply trying to recursively reverse a linked list and wasn't getting anywhere and finally google'd some code and came across the below snippet, [code=c] node … | |
[CODE]main() { char name[10],s[12]; scanf("\"%[^\"]\"",s); }[/CODE] How this scanf will scan? | |
I'm having trouble with my program. It randomises the craps results i.e how many games are won or lost on a particular roll. The problem is, it is supposed run 1000 games but it also randomises the number of games too. Usually between 1000 to 1005. I think it is … | |
how to make a program run when an external device is plugged in???(program run from the computer not an autorun from the flash) | |
i am also seeing the similar problem.. the code is here.. [code=c] #include<stdio.h> #include<string.h> int palindrome(char *a,int n); int main() { char a[20]; int b,n; printf("Enter the string to be checked\n"); scanf("%s",a); printf("The entered string is "); puts(a); printf("%c%c%c",a[0],a[1],a[2]); //empty line strlen(a); b=palindrome(a,n); if(b==0) printf("%s is palindrome\n",a); else printf("%s is … | |
HI All, i know its a known issue but i am again back with same problem.I am trying to find IP of the host. USed this code.: [CODE]struct sockaddr_in sock_name; int sock_size = sizeof(sock_name); struct in_addr remote_addr; int sockfd, size = 15; if (0 > (sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP))) … | |
[CODE]while((fgets(receiving array,50,file_ptr)!=EOF);[/CODE] How this while is executed? | |
| |
hello! i have to find time in nanosecond of a particular process and for that i am using clock_gettime() function. i tried different codes i got from net but getting same error [QUOTE] error: ‘CLOCK_PROCESS_CPUTIME_ID’ undeclared (first use in this function)[/QUOTE] i have included relavent header file of time also. … | |
Hi. I'm new to daniweb and i am also a novice programmer. I have this assignment to get a shape, then a shape inside that one, and then another inside the second one, and then fill each shape in with different patterns. Here is an example. if the user enters … | |
I am a VB programmer, so I know a lot about programming. I am just new to C and want to ask a simple question. How can I read a file and use strtok with space as the delimiter and have access to all tokens in memory? The example provided … | |
[CODE]#include <stdio.h> #include <string.h> #include <ctype.h> int getemail (char * email); int getfirstname (char* firstname); int getlastname(char * lastname); int getphonenumber (char * phone); void main () { char email[30]; char firstname[80]; char lastname[80]; char phone[15]; int namevalid; do { namevalid=getfirstname(firstname); if (namevalid ==1){ printf("You entered: %s, A good name\n",firstname); … | |
Hi, I use Runge Kutta to solve for ODEs. (Thanks for someone who provided this runge kutta code. I'm sorry if I didn't put a credit here) I was wondering why when I set TIME 75, the result of y[3] becomes negative at the time around 70+. it is supposed … | |
Please help... This is driving me nuts. I have been searching for an answer to this for a few days now. In c... How do you stop a line feed or new line after pressing enter for an input. I want the printed information to appear on the same line … | |
[CODE]#include <stdio.h> #include <stdlib.h> /*(*void)displayValue(char* );*/ void main() { char* userInput = (char*)malloc(sizeof(userInput); printf("\n\nEnter : "); scanf("%s", &userInput); printf("\n\nEntered : %s\n\n",userInput); } [/CODE] I have got core dump by running this code. Please suggest. | |
hi,I am an amateur c programmer.I am using turbo c++ v3.1 compiler. here is a simple program to input and display name and address.. There are two problems in my program 1) telephone number is too long for int and it displays some weird value.. so i tried long int, … | |
I made this code and i dont know what to do with my warning in calling function calc() inside the function getOption(). What should i do? need some little help here. [CODE]#include<stdio.h> void getOption(); void getData(int *num1, int *num2); void calc(int option, int num1, int num2); float add(int num1, int … | |
while scanning string we won't use ambers '&' why?? | |
Can anyone help me in generating .stf files for trace analyzer...?? |
The End.