15,550 Topics

Member Avatar for
Member Avatar for m7r23

Hi, I can find the largest number. But I can not find the second largest number. I dont know where to start.

Member Avatar for jeevsmyd
0
168
Member Avatar for george_82

I am new to image processing and can u please help me to convert a GIF image into binary using C programming.

Member Avatar for science.seeker
0
2K
Member Avatar for KV305

Hey guys im having trouble completing this C program. Its suppose to ask the user to enter a file to read from, read the file, count how many times each word appears and print the results in a different file(also user input) arranged from high occurrence. Heres what i have …

Member Avatar for vegaseat
0
101
Member Avatar for danswater

Hi guys! I just wanna ask on how to access the first character in a string?

Member Avatar for danswater
0
96
Member Avatar for chade25

First let me say, please don't post code back all fixed. If you see where the error is, just tell me where it is and I will look to find it. Thanks, much appreciated! [CODE] /* void processCmdLine(void) Function: parses the command line using gettok(), and constructs an argument list. …

Member Avatar for chade25
0
140
Member Avatar for Jamesbch

Hello everyone, I find C not very flexible this time because I know there is an easy way to assign field values to a struct like this : [CODE]Struct mine = { field1, field2, ... };[/CODE] but in my case "mine" is contained in a bigger struct. So I have …

Member Avatar for Adak
0
151
Member Avatar for aea414

Hello all, I think am having problem getting the add_to_list function below to work. I created it so that it accepts a pointer to a linked list, a pointer to a char array (string) and a number for occurrence of the word. [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> #include …

Member Avatar for aea414
0
170
Member Avatar for bbman

Hi folks, I am a beginner in Socket Programming. I am trying to do some simple stuff but had a basic query. I would like to implement something like wget in C top of a TCP socket (i.e., without using any HTTP libraries). Just provide a URL (Example-- $wget [url]www.foo.com/bar.pdf[/url]) …

Member Avatar for Jamesbch
0
101
Member Avatar for chade25

I am trying to write my own shell. I am having problems with the user input part. I have made an array (char inputBuff[512]) and I want to read in user input. I am using ffputs() and ffgets() but I want to limit the person to the 512 size, and …

Member Avatar for chade25
0
114
Member Avatar for Aigulek

Hello, everybody!!! Please, who knows forums to discuss about parallel virtual machine (PVM), could you suggest me. I am writing PVM application, but I don't know well how to read files with PVM. Thank you !

0
51
Member Avatar for danswater

Hi again guys. Well i need to convert char to int my problem is how can i get the exact value of int if for ex: [CODE]char x=2;[/CODE] i need to convert that to integer.

Member Avatar for rax_19
0
113
Member Avatar for SHENGTON

Hello, good day. :) I got a problem with "passes occurred". This is the only problem left in my program. My program is about Naive Searching and Binary Searching. There's no problem with my "Naive Searching". The problem is the "Binary Searching". [b]Naive Searching:[/b] This is the result when I …

Member Avatar for Adak
0
132
Member Avatar for akvilio

Hi, I have a little problem. I need to write a function that will be given a number (with unknown number of digits) and it will search the number for similar neighboring digits. I must say that I'm not allowed to use arrays (unfortunately). I thought of disassembling the number …

Member Avatar for akvilio
0
118
Member Avatar for rajina

Command line arguments in C #include<stdio.h> int main(int argc,char *argv[]) { FILE *fp; char c; if(argc==2) { fp=fopen(argv[1],"w"); while((c=getchar())!=EOF) { putc(c,fp); } fclose(fp); fp=fopen(argv[1],"r"); while((c=getc(fp))!=EOF) { printf("%c",c); } fclose(fp); } return 0; } How to run this program in linux? I have tried these steps: 1. open terminal in linux …

Member Avatar for rajina
0
181
Member Avatar for herrel17

I am making a program to compute simple interest. P*R/100 this is what i have done... Please tell me whats wrong [CODE]int main() { int p,n,count; float r,si; count=1; while(count<=3) { printf("\n enter values of p,n,andr"); scanf("%d %d %f",&p, &n, &r); si=(float)p * (float)n * r / 100; printf("simple interest …

Member Avatar for bulger2503
0
153
Member Avatar for johndoe444

Hi, I thought I have mastered fighting segmentation fault thanks to the assistance of you guys. But still in this days I am getting seg fault. And there is no clue at all. I am writing a suffix tree using a trie. Here is the trace of segmentation fault: [CODE]aba …

Member Avatar for UncleLeroy
0
143
Member Avatar for Akash Mujumdar

I have just started with MinGW. I tried to compile a simple C program ie., Hello World but came up with the following error error:no include path in which to search for stdio.h can anyone help me out with this problem....

Member Avatar for UncleLeroy
0
164
Member Avatar for viwenka

Can anyone help me with my code?! I need to do a programm binary to decimal converter without using library, just stdio.h my code works wrong [CODE] void bin2dec(){ long int n; int s=1,j,p=1,i=0,x; int digit=1; printf("Input a binary number: "); scanf("%ld",&n); while(digit==1) { x=n%10; s=s+pow(2,i); i=i+1; n=n/10; if(n==0) digit=0; …

Member Avatar for UncleLeroy
0
193
Member Avatar for Cpp_Addict

Hey guys. In C++, if I wanted to read strings into an array I would do this: [code]std::string theWord = ""; for ( int i = 0; i <= SIZE; i++ ) { std::getline ( std::cin, stringArray[ i ] ); }[/code] In C, I am having trouble comming up with …

Member Avatar for urjapandya
0
2K
Member Avatar for kymarscheng

I have made a program to test if the string entered is a palindrome or not. Here's the source code: [code=c]#include <stdio.h> #include <ctype.h> #include <string.h> void clrsp(char *); void rev(const char *,char *); int main() { char str1[80],str2[80]; printf("Enter a string: "); fgets(str1,80,stdin); str1[strlen(str1)-1]='\0'; //eliminate newline clrsp(str1); //clear spaces …

Member Avatar for urjapandya
0
149
Member Avatar for sirio.bm

Developing on an ubuntu system, using code::blocks. Need to read and write to XML config files. there is a DOM library for Gnome, libgdome2. Found a good source for this at [url]http://gdome2.cs.unibo.it/[/url] I am trying to compile the following code, which is more or less straight from the tutorial on …

0
45
Member Avatar for krap_nek

Hi, well what I'm trying to do with this, is to read a text file line by line and pass its data to the struct. the problem is that not only i can't read the strings and put it on the struct fields, I also get a segmentation fault. Could …

Member Avatar for xwolfjack
0
3K
Member Avatar for allnillin

i have finished writing my program, but teacher want me to write a checkbook balancing program of a user's account. It has to use getline () to read a line, which will contain either the word "withdrawal" or "deposit". After reading each pair of line, the program should compute and …

Member Avatar for allnillin
0
1K
Member Avatar for newbiecoder

Hello I'm trying to get a random float number between two float numbers using rand() function but I couldn't write it by myself, can you show me how to do it? Thanks...

Member Avatar for arkoenig
0
433
Member Avatar for nosson

I have the R code for Fisher's exact test, however, I it's a bit too much and I am getting bogged down trying to read through the code. My objective is to calculate the test for a 2x2 table, but I am a bit confused as to where to begin... …

Member Avatar for jonsca
0
93
Member Avatar for dsrepublic

struct tnode { int data; struct tnode* left; struct tnode* right; }; struct tnode*talloc(int data) { struct tnode*p=(struct tnode*) malloc(sizeof(struct tnode)) if (p!=NULL) { p->data=data; p->next=NULL; p->right=NULL; } return p; } int main(){} I am getting a [error: 'NULL' undeclared] error, Any help would be greatly appreciated.

Member Avatar for gerard4143
0
86
Member Avatar for omGac0W

So this is part of the code in one of my functions, and whenever I enter either yes, no, or something else, no matter what the response the do loop will loop again. I don't think my "if(response == "yes")" is working. Help please? :D [CODE] char response[10]; int answer; …

Member Avatar for ryuurei
0
7K
Member Avatar for Aigulek

Hello everybody! I am just a beginner in C, so i have some problems with the password input . This is for bank account, it asks user for password input, but it doesn't works properly for three attempts, in order to go to menu: Could you help me please, what …

Member Avatar for Aigulek
0
103
Member Avatar for pawan_sharma777

I write this program to cheak user name and password enter by the use is same then the user is able to login, for this i declare a pointer array to store some user name and password (like sin up by user),and then the user enter her user name and …

Member Avatar for Ancient Dragon
0
137
Member Avatar for Lux Fero

Hello World, [INDENT][/INDENT]Can anybody help me to create a windows applcation with turbo c. Am newbe in turbo c and I learned to make c programmes very well, but I Am facing a lot of problems since I moved to windows applications and i can't understant why turbo c doesn't …

Member Avatar for Lux Fero
0
141

The End.