15,552 Topics

Member Avatar for
Member Avatar for moroccanplaya

Task Your task is to write a file archive utility similar to that of the Unix tar program. This program will be a command line program (i.e. there will be no graphical user interface). The purpose of this file archive utility is to allow users and system administrators alike to …

Member Avatar for Dolby779
0
219
Member Avatar for tadas.bareikis

Hi I have written a program, it doesn't work and i can't figure out why. It does compile, but it doesn't run. The whole program: #include <stdio.h> #include <stdlib.h> #include <ctype.h> int main() { int a; int j; int c; int d; int dig; c = 0; int i; a …

Member Avatar for Moschops
0
168
Member Avatar for chinmayi4216

A player is good if the following conditions are satisfied: He is either from “India”, “Japan” or “Korea” He has a minimum of 3 years of experience He has won at least 3 major tournaments, and one of them must be "World Championship Tournament". He must know more than 10 …

Member Avatar for Gonbe
0
292
Member Avatar for wollacott

i need my program to read in a file reverse it then write the file out. i got the reverse correct but its not working.my errors are: n.c:12: warning: passing argument 1 of 'fopen' from incompatible pointer type n.c:21: warning: passing argument 1 of 'fopen' from incompatible pointer type n.c:22: …

Member Avatar for Miorfs
0
2K
Member Avatar for devilmaycry1

hi friends I've a code to compute integral with area function in code. I used Fork, and for returned values I must use shared memory. now I need to embed a semaphore in my code to control the critical area(here is shared memory). I don't know how to embed semaphore …

Member Avatar for DeanMSands3
0
2K
Member Avatar for rrreeefff

Hello, I am trying to compute the GCD non-recursively. I have no errors but when I run the program it aborts because it says c is not intlized. [code=cplusplus] #include "stdafx.h" #include "stdio.h" int main (void) { int a,b,c,r,result; printf("enter a value for a\n"); scanf ("%d", &a); printf("enter a value …

Member Avatar for deceptikon
0
321
Member Avatar for prakhs

Hi, can u all help me with a question. I have been given two boolean 2d square arrays. 1st array is one having random true or false values. 2nd array is with all true values. Suppose eg n = 4; 1st array : false true false true true true true …

Member Avatar for prakhs
0
363
Member Avatar for LinDoc

Hi! I am learning C, and am at very introductory level, using this book called C Programming: A Modern Approach. I have just studied about arrays, and while tackling the programming exercises,i got stuck in Que 9 in Chapter 8. This is what the question says [INDENT]Write a program that …

Member Avatar for pizFunk
0
2K
Member Avatar for Bchandaria

Any one can help me out i want to display a spiral of n*n size with out using arrays? out put when n=2 should be 3 2 0 1 when n=3 should be 8 7 6 1 0 5 2 3 4 when n=4 should be 15 14 13 12 …

Member Avatar for ahmedhamdy
0
3K
Member Avatar for tadas.bareikis

Hi I have started learning C and my first problem is very simple. I can't get output from a program! What am i doing wrong? #include <stdio.h> #include <stdlib.h> int main() { int a; int c; c = 0; int i; a = 0; for (i = 0;c = 0;i++) …

Member Avatar for deceptikon
0
108
Member Avatar for nitin1

#include<iostream> #include<algorithm> using namespace std; #define MAX 10000000 #include<stdlib.h> #include<string.h> char s[MAX]; int p[MAX]; int bucket[MAX],nbucket[MAX]; struct suffix { int idx; }pos[MAX]; int H=0; bool cmp(struct suffix i,struct suffix j) { if(H==0) { return s[i.idx]<s[j.idx]; } else { if(bucket[i.idx]==bucket[j.idx]) { return bucket[i.idx+H]<bucket[j.idx+H]; } else { return bucket[i.idx]<bucket[j.idx]; } } } …

Member Avatar for deceptikon
0
615
Member Avatar for nagaraj_hayyal

Hi All, I want to know how to list the all the symbols in the shared library(dll or .so file). I dont want commands like nm or objdump. I want to get the list of functions available in shared library programmatically at runtime (after calling dlopen and dlsym). Is there …

Member Avatar for deceptikon
0
83
Member Avatar for rkumaram

Hi , I am able to compile my program , which simply connect to mysql and prints the table result. But I am unable to compile it with Makefile. Any pointer will be appreciated. My program: [code] #include <mysql.h> #include <stdio.h> main() { MYSQL *conn; MYSQL_RES *res; MYSQL_ROW row; char …

Member Avatar for gut.besserwasser
0
6K
Member Avatar for yawbiney

Hi people, I am a beginner C learner and I'm having a bit of trouble checking a structure to see if its empty or not. I am writing a program for a phonebook/contact book and I have everything working actually but I want my program to check all arrays in …

Member Avatar for ahmedhamdy
0
2K
Member Avatar for Landoro

Hey guys,I'm new,but I study C programming language and I have this awfull problem. I have make a matrix A[n][n],in which n is an odd positive number(of course),and the matrix must "unwrap" itself with the number 1 in the middle then 2 to the top,then clockwise 3,4,5,..etc,until it wraps the …

Member Avatar for Adak
0
198
Member Avatar for davecoventry

I have an int64_t value which I'm trying to write to a file. `fwrite(&page->id,sizeof(page->id),1,tid); if the value of page->id == 00 00 00 00 00 00 00 03, then the variable is written correctly as 03 00 00 00 00 00 00 00. However, if the value is 00 00 …

Member Avatar for davecoventry
0
281
Member Avatar for sripad44
Member Avatar for ilanda68

[QUOTE=stackOverflow;164345]Hi, Oops sorry! I had not put double slash in the "path" in initgraph. :o Its working now. Anyway,thanks a lot. And the OS is xp.. but i don't get it.. how does it matter??[/QUOTE] hi, i've the same fucking problem: My PC failed and then I must to move …

Member Avatar for inheaven
0
2K
Member Avatar for artur.sinelnikovs

I'm not really getting the bigger picture with regards to linked lists. What needs to be done to link it? Also, there is an error with strncpy and for some reason on line 35 its not recognising struct trainset anymore and calls it a undefined variable. #include <stdio.h> #include <stdlib.h> …

Member Avatar for sanket044
0
144
Member Avatar for you207

I need to write a program that gets content of txt file and display all 4 letter word . Can someone help ?

Member Avatar for deceptikon
0
2K
Member Avatar for revelator

Friends, i have to submit a project on Car Rental System which is to be made in C. i have made half of the work like giving out the menus using Switch, but the prof told me that i have to now input the details of the customer and then …

Member Avatar for Miorfs
0
4K
Member Avatar for general2012

i have written this code to copy 5 names in a structure #include<conio.h> #define loop_count 5 char copy_name(char *); typedef struct{ int count; char name[3][20]; }student; student *p; //declare structure pointer; int main() { student s; //declare variable of type student ; p=&s; //giving p address of s; p->count=0; //initialize …

Member Avatar for general2012
0
147
Member Avatar for RockJake28

I have tons of files in this project as I am programming an ARM board. Making a tilt snake game where the snake is controlled by an accelerometer. I am using a timer interupt (handled by timer0.c) to toggle a boolean variable `extern bool toMakeFood;` stored in "includes.h" that tells …

Member Avatar for deceptikon
0
298
Member Avatar for IwalkAlone

Q.Write a function to concatenate to input strings into one large string and display the result. I know how to do this using strcat but not without it. Also can't use pointers. Please help!!

Member Avatar for ahmedhamdy
0
2K
Member Avatar for celina1234

I have a text file which looks like this : Flooding refers to all water that overflows a node, whether it ponds or not. -------------------------------------------------------------------------- Total Maximum Maximum Time of Max Flood Ponded Hours Rate Occurrence Volume Depth Node Flooded CMS days hr:min 10^6 ltr Meters -------------------------------------------------------------------------- 1064 0.15 0.000 …

Member Avatar for deceptikon
0
121
Member Avatar for THEboss007

#include <asm/uaccess.h> #include <asm/system.h> #include <linux/types.h> #include <linux/kernel.h> #include <linux/string.h> #include <linux/mm.h> #include <linux/socket.h> #include <linux/in.h> #include <linux/inet.h> #include <linux/netdevice.h> #include <linux/fcdevice.h> #include <linux/skbuff.h> #include <linux/errno.h> #include <linux/timer.h> #include <linux/net.h> #include <linux/proc_fs.h> #include <linux/init.h> #include <net/arp.h>

Member Avatar for THEboss007
0
937
Member Avatar for newbie14

We are trying to send several emails via C language on a centos 6.2 platform. Below are the codes. I added and left char *filename = ""; the I get error as sh: TEST: No such file or directory sh: TEST: No such file or directory sh: TEST: No such …

Member Avatar for newbie14
0
297
Member Avatar for general2012

facing problem to copy string to a structure via function.can input the name but just cant copy it.can anyone help #include<stdio.h> #include<stdlib.h> char copy(char *);//declare prototpe; typedef struct{ char student_name[20]; int count; }student_data; student_data *p;// declare structure variable; student_data s;//declare structure variable; int main() { p=&s;//give p the address of …

Member Avatar for general2012
0
224
Member Avatar for OTayeby
Member Avatar for Adak
0
246
Member Avatar for general2012

i am trying to assing value to a structure member using pointer and then increment and print it .so i write the following code.not working though.how to fix this or how can i do something like this.help please #include<stdio.h> #include<stdlib.h> typedef struct{ int count; }number; int main() { number *p; …

Member Avatar for general2012
0
2K

The End.