15,552 Topics
| |
Hi again. I have a file that have about 1000 lines, and then, time by time I need to read some of this lines, for example: 13:00:00 read lines 01 to 100; 13:30 read lines 101 to 400; .... 15:00:00 read lines 900 to 1000. There is a way to … | |
hi guys, this is my first post to the forum although i do use this website regularly for help. now i have a problem with my code for a sorting program i am making. basically the program is used to make a random number list and then you should be … | |
I noticed something interesting today. When I run the executable directly it gives no hint where the segmentation fault happened. But if I run it from gdb it gives the line number where the seg fault happened. So I was wondering whether there is any similar utility which I can … | |
Hello All: I want to create an array of structures like so: [CODE] #define MAX 10 struct hash_tbl { int key; int data; }; struct hash_tbl hash_array[MAX], *ptr; [/CODE] Now, I am having some issues in attempting to "loop" through my array of structures and just generate the some data … | |
how will i round off the return value to decimal place with tis function? [code] unsigned int CalculatePercentage(int TotalComponent, int PartialComponent){ return int((PartialComponent/TotalComponent)100); }[/code] | |
Hey Peeps....... I want help regarding aol instant messenger mail client. i have got its password storage location. it stores it in registry as like this: Hkey_current_user/software/america online/aol instant messenger/users/login I want to know that how this mail client decode its password from this file. Do you have any knowledge … | |
i am writing a code that inputs a struct (of two ints) into an array pointer of this specific struct, i need that some of the "cell" in the array will be empty(with NULL or spam like -568558), but still i need to identify those cells and not print them....just … | |
Hello I need pthread.h library in my program in C and i am using Visual Studio. how can i use threading in C? i visited this [URL="http://sources.redhat.com/pthreads-win32/"]site.[/URL] but i dont know what to download and where to put it. I mean what am i supposed to download- header file or … | |
The compiler is displaying that i have a syntax error at the end of input for the below code [CODE]void doctorreport(void) { system("color 2"); char Target[50]; int tell=0; int Found=0,count=0; char doctor1[30],doctor2[30],doctor3[30]; int health=0,fees=0,collected=0; int choice=0; if((customer1=fopen("transaction.txt","r"))==NULL) printf("THE FILE IS EMPTY"); else { printf("\n\n\t\t PLEASE ENTER A OPTION BELOW FOR … | |
I am scanning the contents of file and then performing some simple operations. First i want to scan the file for a particular doctor name that works. I have two records in the file but its not incrementing the counter to check patients which belong to that doctor and add … | |
Hi eveyone :) I am having trouble understanding some big o notation that i have been given in homework. I have tried reading my text books but nothing makes sense to me well. Below is one of the problems i have been given [CODE=C] #include <stdio.h> int main() { int … | |
Hi, I have a simple question about the Linux Shebang '#!'. Well more of a clarification of how Linux handles #!. My understanding.... When the operating system 'Linux' encounters an executable file with the first characters #! it will extract the absolute path for the executable from this line..i.e. #! … | |
Hi all, My problem is regarding to my last post about argument. that is solved but it create a new problem. The last data in debug_file is not written in output file. I think its because of looping in the argument.How to solve this? [code] int main(int argc, char* argv[]) … | |
The Fibonacci sequence is the series of numbers 0, 1, 1, 2, 3, 5, 8, .... Formally, it can be expressed as: f ib0 = 0 f ib1 = 1 f ibn = f ibn−1 + f ibn−2 Write a C program using the fork() system call that that generates … | |
Hi, First time post here. I understand that you all like to have attempted code, but I just have a conceptual question. My task is to create a C program that takes in a user inputted string and counts the character frequency. I am given a skeleton file with the … | |
I'm trying to figure out a way I can change this program so that I could have a semi-colon ; instead of \n to indicate the end of a command, like this: a ; b The command is: a The command is: b a The command is: a How can … | |
Hello My problem is that I have to solve a cryptarithm (assign a unique digit from 0 to 1 for each number) where: O N E + O N E = T W O S E V E N is prime E I G H T is a perfect cube … | |
Hey I was writing programs in C using turbo C in dos box(vista)....however when i try to compile any program, I get the error: "Unable to include file "header file" I checked but and all the files are where they should be. Please help. | |
I made this really strange and not working code just to count the total number of letters in a string(user inputs then stops with enter), as well as divide each individual character(a, b, c etc) by the total number and show that as well. The reasoning seems right but can … | |
Here is my current situation. I have a global array and it is originally declared as an int pointer. I malloc (100*sizeof(int)) to this pointer in the main method. I then use this array to store values and these values are assigned inside of two for loops. The problem is … | |
K...so this is an airline reservation program I have been working on for school and I can't see where I am going wrong. Basic functions of this would be taking reservations for either first class or economy class seating on a 10 passanger plane. seats 1-5 are supposed to be … | |
I want my code to take two characters and print them, but this code only takes one character, prints it and terminates, can you please tell me what's wrong with it? Thank you. [code=syntax] #include <stdio.h> int main() { char a, b; scanf("%c", &a); scanf("%c", &b); printf("%c %c\n", a,b); return … | |
HELO EVERY BODY I NEED HELP WITH THE FOLWIN ASSIGNMENT PLZ 1- The programming assignment ( The number-guess assignment ) The main issue of this assignment is to guess a random number in a well defined range. The machine will select a random number; the program will try to catch … | |
When this program prompts the user for input, it works fine for the correct input. But for the wrong inputs, it returns a zero for every character, including the white spaces. My goal of this program is to return a roman numeral as an integer. For the wrong inputs, I … | |
I'm trying to get this program to ignore leading tabs and blanks, but I just can't seem to figure out how. What can I further do to improve this program? [CODE]/* Read a command, skipping over leading blanks and any trailing * characters. */ #include <stdio.h> /* Declare functions */ … | |
Hello, I just only want to ask.How to connect MS access database to a C program.See the code below: #include<stdio.h> char firstname[20], middlename, lastname[20]; main() { clrscr(); printf("Enter your First Name: ");scanf("%s",&firstname); printf("Enter your Middle Name: ");scanf("%c",&middlename); printf("Enter your Last Name: ");scanf("%s",&lastname); getch(); } This is what I want to … | |
The following code when compiled gives the error: "i[B]nvalid conversion from `void*' to `f*' "[/B] What is wrong with it ? [CODE] typedef struct a { int* value; struct a* p; int r; }f; f* m(int* value) { f* node = malloc(sizeof(f)); node->value = value; node->p = NULL; node->r = … | |
Please help me to transform this phonebook porgram into a linked list phonebook program with delete function..This is my code... [CODE] #include<stdio.h> #include<conio.h> #include<string.h> #include<stdlib.h> struct info{ char name[50]; int TelNo; }; struct info gab[50]; int rec=0; char ch; char search[50]; int c; main() { do{ do{ clrscr(); printf("Phonebook"); printf("\n1 … | |
i have this code: [code] int main(int argc, char* argv[]) { remove(debug_file); count=0;//count d number of seeding for (int i = 1; i < argc; i++) { /* Check for a switch (leading "-") */ if (argv[i][0] == '-') { /* Use the next character to decide what to do. … | |
Hey Peeps....... I want help regarding CORE FTP( File Transfer Protocol) Client. i have got its password storage location. it stores it in registry as like this: [B]Hkey_current_user/software/ftpware/coreftp/sites[/B] I want to know that how this FTP encode its password in this file. Do you have any knowledge of its working...any … |
The End.