15,551 Topics

Member Avatar for
Member Avatar for gedas

hey guys, im working on a little program that would ask the user to input file name and would ask the user again to specify the output file so the contents of file one would be transferred in to the file 2. i have been working on it for few …

Member Avatar for gedas
0
178
Member Avatar for BoB3R

Hello, I am trying to do a program that is reading for example a.txt file that have 5 lines and i want him to show me for example line #3 only, i know i need to use fgets but i rly dont know how to start it a.txt [CODE]1;27.01.1957;8;12;31;39;43;45; 2;03.02.1957;5;10;11;22;25;27; …

Member Avatar for Dave Sinkula
0
125
Member Avatar for phil750

I have code that outputs data as so [code] Input file name: file.txt Input text: Process id 1, Quantum No 2, Priority 0 Process id 2, Quantum No 3, Priority 1 Process id 3, Quantum No 3, Priority 0 Process id 4, Quantum No 1, Priority 2 Start of processing …

0
87
Member Avatar for leeba

I want to read he source file of the .exe I am writing. For example if I am running test.exe I want to read test.c Also if the name of the file changes it still had to open it. what i have tried is: [code] FILE *fp=fopen(*.c,"r") [/code] Can someone …

Member Avatar for leeba
0
670
Member Avatar for nayef

Hi , I am in a big trouble , I am student ( electrical engineering ) in freshman year who has a course in c . I need your help in writing my project which is going to be submitted on Saturday 23 Jan and I am not familier with …

Member Avatar for jonsca
0
138
Member Avatar for sree_ec

I am posting this for a suggestion. I want to know which is the optimized way for writing a C code for the below problem. question is to ouptut the below string "Post New Thread " to "Thread New Post" I have 2 methods. 1. Read the each character in …

Member Avatar for Ancient Dragon
0
140
Member Avatar for phil750

I have an array, b[10]; i would like to add up all the values in that array and store the answer as wt. any help?

Member Avatar for mrnutty
0
94
Member Avatar for phil750

I have an array full of ints, the program prints out a line depends on the numbr of int e.g. if int is 8 it will print the line 8 times. And do this for all the ints stored in the array. this is my output: Start of processing ---> …

0
77
Member Avatar for mayuriIT
Member Avatar for nshh

Hi, I m working in c and unix... Help me out how to become an expert in c programming.... suggest some website link, tutorials and books...for both c and unix.. Thanks, Nshh.

Member Avatar for Dave Sinkula
0
98
Member Avatar for iamminsk

[CODE]//word frequency counter #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> struct words { char word[255]; int count; struct words *next; } *pointer, *start, *previous; int statistics(); int main(void) { statistics(); system("pause"); return 0; } int statistics() { FILE *fp; int pom,a; char quest[255]; start=NULL; fp=fopen(name, "r"); fscanf(fp, "%s", &quest); …

Member Avatar for iamminsk
0
277
Member Avatar for gedas

hi guy i started learning c recently, and im trying to do exercises from the book the bad thing is they are not showing the solutions. what i need to do is simply modify the program below so that instead of reading single characters at a time, it reads in …

Member Avatar for mitrmkar
0
126
Member Avatar for javaStud

Hi, I am trying to implement a crc check but I am not having the correct output. i.e. I am having a "Corrupted file" when the file is not corrupted, and vice versa. I am not "seeing" my mistake since according to me the logic is right. The wierd thing …

Member Avatar for thomas_naveen
0
73
Member Avatar for lio180

hi all, i have i this question for my project, but i have some problems with sorting the names of students by alphabetical order and order the names by their scores. the names are strings and the scores are of type int. this is the question and i want functions …

Member Avatar for printrobin
0
112
Member Avatar for neoeinstein

I am very new to C++ and have written only basic algorithms. In school we use turbo c++ compiler but now i have to attend a workshop for which I need to be able to use a gnu compiler and I do not know how to change my programs for …

Member Avatar for neoeinstein
4
670
Member Avatar for ubi_ct83

hi and thanks for advance, i have a problem to compare between 2 arrays. i have a file name fruit_file which has a content like this: apple orange mango banana papaya and i have an seed array from arg list which is; mango lime pineapple peach i want to copy …

Member Avatar for thomas_naveen
0
112
Member Avatar for bonzi200x

I'm implementing a TCP protocol. TCP implementation requires to send packets continuously and if the receiver doesnt respond after a particular interval of time it should resend the packet again. I need some method to implement a timer expiry function. How can I implement it?? Should i implement threads (If …

Member Avatar for bonzi200x
0
68
Member Avatar for phil750

Ok i half have a working scheduler. The idea is to print out input from a text file, with the process id quantum and priority, sort them out into priority order, 0-20(0 highest) ad print them out the number of times the quatum is. here is what i have so …

Member Avatar for phil750
0
106
Member Avatar for ContactaCall

I'm trying to get some user data into an INSERT query using the Mysql C API (don't know if this belongs rather in the Mysql forum, let me know...) I have the following code taking some pointers from the Mysql webpage forum, but to no avail: [CODE] #include <mysql.h> #include …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for zzjason

somebody help me please! Write the following C\C++ program: Program starts two threads (from now onwards A and B). Main program generates number N from range 5000 and 10000. Number N is passed to thread A. Threads A generates N random numbers from the range [1, 100]. Generated numbers are …

Member Avatar for Ancient Dragon
-3
122
Member Avatar for bhushnxx

In this assignment a scheduler algorithm needs to be designed and implemented. The scheduler designed will be used for scheduling different tasks/process to be executed in a system. There are different kinds of processes in a system. When the process enters the system it will be directly stored in the …

Member Avatar for Ancient Dragon
-5
131
Member Avatar for mas20k

give me the answer in bignners level write a program using c language to save ten numbers in an array and display them in reverse direction

Member Avatar for gerard4143
-10
54
Member Avatar for iamcreasy

This simple code is producing weird output. I write a line and press enter, it echo's the line...well, supposed to...Because, sometimes, it is not showing. In code blocks, i can assume that when the program is returning zero the program is terminating correctly. I tried to figure out, when it …

Member Avatar for xavier666
0
143
Member Avatar for baken33

i had a term project and i must do until monday . Can you help me please ? :( 1. Write a C program that plays the game of “guess the number” as follows: Your program chooses the number to be guessed by selecting an integer at random in the …

Member Avatar for Nick Evan
-3
146
Member Avatar for vaibhav2614

I am writing a C program that requires me to use a dynamically allocated struct which is defined as below. [CODE]typedef struct 513 { 514 char* word; 515 int freq; 516 }wordfreq;[/CODE] When I allocate the word field of this struct, I am allocating this dynamically as well (using strdup). …

Member Avatar for Narue
0
109
Member Avatar for tzushky

Hi, Simple but driving me nuts. I am trying to create a table of pointers to already defined structures. But I can't find correct directions and I'm not used to this so HELP pliz! I managed to do it for functions, for some reason I can't find how to do …

Member Avatar for Narue
0
184
Member Avatar for ContactaCall

how would this be done [CODE]int main(void) { char string[]="231 number 73 word 1 2"; char *ele; ele=strtok(string," "); while (ele != NULL) { if (*ele == '0' || *ele == '1' || *ele == '2' || *ele == '3' || *ele == '4' || *ele == '5' || *ele …

Member Avatar for ContactaCall
0
244
Member Avatar for ContactaCall

So I'm using Mysql to make a text-to-speech engine. Basically any given phrase by the database is returned to my script, which has to say every word and number, if any, by way of voice . For the voices I'm using Asterisk, but that's another problem of my own lol …

Member Avatar for Dave Sinkula
0
407
Member Avatar for johndoe444

hi, 1) what q signify and how can it be of any use? int* p = 0; int* &q = *p; 2) what does it do? int main() { return main; } It compiles with gcc (not g++) and running the executable does not do anything without error. Thanks.

Member Avatar for gerard4143
0
94
Member Avatar for mindbender

I have to create a random matrix m*n where m and n are user inputs. Now i have to fill the matrix with random nos. Finally I must have a matrix where each value is either 0 , 1 , a fraction no between 0 and 1, and also sum …

Member Avatar for Nick Evan
1
5K

The End.