15,551 Topics
| |
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 … | |
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 … | |
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: … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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++) … | |
#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]; } } } … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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> … | |
I need to write a program that gets content of txt file and display all 4 letter word . Can someone help ? | |
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 … | |
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 … | |
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 … | |
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!! | |
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 … | |
#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> | |
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 … | |
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 … | |
Dear All, How to read a csv file in c? Thank you in advance. | |
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; … | |
I'm learning to get used to the pointers in C and I have a question about them that I coudln't understand. Anyways, why this code gives segmentation fault? void print_arr(const char *p_array[]){ int index; for(index = 0; p_array[index] != 0; index++) printf("%s\n", *p_array[index]); } while the one without a '*' … |
The End.