15,551 Topics

Member Avatar for
Member Avatar for sarwar

Hi, I am seeking your help on following pthread_create issue on linux OS. The senario is I have a main program which generates new child threads on user request.The new child executes a module and closes. It is working perfectly if there are less then 245 new threads after that …

Member Avatar for Salem
0
175
Member Avatar for appuguy

Sample Input:o 0 4 0 5 0 8 0 7 0 Press any key to continue . . . This is what I have so far for the code [ [code=c] #include <stdio.h> #include <stdlib.h> #define ARRAY_SIZE 81 int nArray[ARRAY_SIZE]; /*Function prototypes */ void PopulateArray( int nArray[9][9]); void PrintArray(const int …

Member Avatar for WaltP
0
252
Member Avatar for Barefootsanders

Hey everyone, I'm using Dev-C++ to compile the following program. It's simple but for some reason its not working. [CODE] #include <stdio.h> #include <unistd.h> int main() { int n, fd[2], pid; const int MAXLINE = 4096; char line[MAXLINE]; if(pipe(fd) < 0) { printf("Pipe error"); } if((pid = port()) < 0) …

Member Avatar for Duoas
0
279
Member Avatar for theteamdrunk

I need to add prompts for the number, integer and character inputs separatly instead of all at once. I want it to say "enter a number" wait for input, "enter an integer" wait for input and "enter a character" wait for input. Then it is suppose to combine the inputs …

Member Avatar for Duoas
0
120
Member Avatar for appuguy

Hello I need help with a C program that I solves Sudoku puzzle. I am suppose to write two functions one to populate the arrays from the user input. This function should take as parameters the arrays to fill.Second function to print the 9 by9 array passed to it.This function …

Member Avatar for Ancient Dragon
0
105
Member Avatar for CornPoper
Member Avatar for jigart4586

hi, i a m jigar thakkar please help me. int a=1; printf("%d%d%d",a++,a++,a++); output : 3,2,1 how work this in c? please explain in detail? Thanx in advance.

Member Avatar for Ancient Dragon
0
105
Member Avatar for Badong Ang Lim

Hello I'm new here, I try this site when I found the url in the web when I am trying to solve my problem. And I became interested and join. Hope you can help me with this one: I have this program: #include <stdio.h> main() { char input; int base,a,b,c,d,e; …

Member Avatar for Badong Ang Lim
0
439
Member Avatar for arkane

Hello to the forum, perhaps someone can help me. I am trying to read a file that has the following format: 128 byte header float data When reading the header, I need to extract the following from the header: bytes0-6= short unsigned int big endian byte7 = int bytes8-23= float …

Member Avatar for arkane
0
145
Member Avatar for warpstar

First of all I would like to say that I am a super newb at C, and would appreciate any help possible. I have to read a text file of words and sort them in lexicographical order (alpha order), I tried using the bubble sort and got this error on …

Member Avatar for Salem
0
483
Member Avatar for sohanonline

hello..... i just had a problem with file management in c programming.my friend gave problem but i dont know how to see the output.is there any file which i have to create first and see the answer?please help me.thanks.:)

Member Avatar for iamthwee
0
110
Member Avatar for mt171406

[INLINECODE]I am trying to develop a program that reads a list of integers from a file and outputs whether or not each integer in the file is perfect. Its suppose to give practice using endfile-controlled and for loops. The input file of numbers i have created are : 456 18 …

Member Avatar for Aia
0
85
Member Avatar for zayalaksme

please any one send a program to "[B]addition and subtraction of two SIGNED BINARY NUMBERS by using 2'S COMPLEMENT[/B]" it is urgent

Member Avatar for Salem
0
68
Member Avatar for vinaychalluru

Hi,every one.I am new to C language and there I had tried a program as here and I got an output from what I had expected and hope you will help in this aspect and I have given the program as an attachment for better viewing of it. thank you …

Member Avatar for Ptolemy
0
124
Member Avatar for mank

I am trying to convert some data that I read in file as string data to a float array The data that is read are in two dimensional string array like [CODE]char tmatrix[10][100]; for(j=0;j<k3;j++){printf("\n %s",tmatrix[j]);} //k3=max data read 0.5 0.2 0.3 0.6[/CODE] Now I need to convert the content of …

Member Avatar for Salem
0
116
Member Avatar for profess69

Hello anyone if you see this please reply fast: i need some major help with some programming and logic code through liberty basic, My project consist of making an ATM Program allowing the user to only enter the security code 3 times and it also prompts you to enter a …

Member Avatar for Ancient Dragon
0
333
Member Avatar for mt171406

[INLINECODE] I am having a problem trying to write a program that gets numbers from a selected file and returns each numbers sum of its perfect divisors. Could anyone give me a few pointers??[/INLINECODE] [CODE]#include <stdio.h> /* define fopen,fclose,fscanf,fprintf, EOF */ int sum_of_divisors(int num); /* pre: Accepts the integer */ …

Member Avatar for mt171406
0
343
Member Avatar for rocksteady911

Hi everyone, I was browsing through the forum to find some code for a palindrome program. I get some parts of it, but I'm confused what a certain while loop does. Can anyone help clarify? [code] char s[256],t[256]; /*char array of length 256*/ char *p,*q,*r; /*define char array*/ int i=0,j=0; …

Member Avatar for Aia
0
115
Member Avatar for fcleme

I am trying to relearn C by going through the K&R exercises (I have the first, non-ANSI, edition...that's how long it's been since I last programmed in C under Unix as a software engineer). I have Visual C++.net version 2003 on a Windos XP computer. I would prefer to continue …

Member Avatar for Ancient Dragon
0
134
Member Avatar for susuoi

I'm doing image processing. To make the computation faster, I found fork command. With fork command, I can make the computations run parallelI. The problem is the result only exists inside child process. int main(int argc, char **argv){ int n, num, pid; double hist[num][n]; for(i=0; i<num; i++){ if((pid = fork()) …

Member Avatar for Salem
0
78
Member Avatar for Ptolemy

>I disagree. You have to have all kinds of special code to get scanf() to work properly. Only if you aren't using scanf for what it was designed in the first place. When you have to write workaround code to get a function to work, you're using the wrong tool …

Member Avatar for Dave Sinkula
0
412
Member Avatar for megan-smith

hey! I'm working on a program that part of it asks for an integer input. then if the value entered is not an integer, it should print an error message. If not, then the rest of program (which I've got partly complete). But, I have no idea how to distinguish …

Member Avatar for WaltP
0
574
Member Avatar for FEARmike21

So i have to write a calculator program that a.entering the letter q quits (i got this part) b.if more than one character is added into the opperator return an error message and give another chance (i think i need to use a char buf[80] and then state that if …

Member Avatar for WaltP
0
76
Member Avatar for amarnath.dasari

Dear sir/madam how can we concatinate the character string to the integer string without using sscanf( ),sprintf( ),atoi( ),itoa( ) . With Regards, AMARNATH

Member Avatar for Ancient Dragon
0
81
Member Avatar for marr007

Hello everyone, so I am working on a word puzzle generator. I have the bulk of it completed-but I am confused on how to proceed from one part. The puzzle must be a user defined size, but the words must then be outputted to a grid in either diaganol, up …

Member Avatar for WaltP
0
142
Member Avatar for csteverun

Hello C programmers, I understand the general nature of library files, that C needs them to understand include files, that they come in many flavors (.lib, .dll, .a, .so), but I don't understand the process of taking source code X and then using it to build library file Y. My …

Member Avatar for csteverun
0
103
Member Avatar for locy

can someone give me a hint on how to write C programm with this output. 0 00000000 00000000 00000000 00000000 cammand 1 00000000 00000000 00000000 00000001 and so on i ve try this but it doent work scanf("%d",integer) printf("\n wert war: %d,integer") return 0;

Member Avatar for locy
0
71
Member Avatar for bobei89

Please help~ i stuck in this question so long time... This assignment is need to hand up due tomorrow >.<''' . Once again i confuse about array. Please correct me and show me some tips ya. Any of ur attention will be 'God Bless You'. Here is my coding>>> [code=c] …

Member Avatar for bobei89
0
213
Member Avatar for cwarn23

I have found a program and tried using 'DEV C++' but it only reported an error report. I later then discovered that is was because 'DEV C++' used C++ when the code was designed for just plane C. I have searched the web and this forum but only found two …

Member Avatar for Kocmotex
0
497
Member Avatar for woozyking

My problem was over here: [url]http://www.daniweb.com/forums/thread93806.html[/url] After many advices, helps, I could eventually solve this problem myself, happy~~:D All I did was to write a replacement function for strcmp() and then use a bubble sort function to sort input strings in lexicographical order. Much simpler than nasty nested loops :P …

Member Avatar for Ptolemy
0
334

The End.