18,491 Topics

Member Avatar for
Member Avatar for locy

How do i write a programm that the given text.the longer the text will factorized (in primenumber order).The text is for the following transformation as matrix with the Dimention [B]n[/B](breath;smaller Primefactor) multiply [B]m[/B](highest;bigger Primefactor).The letters of this matrix will in column by column displayed the output format is the transpose …

0
87
Member Avatar for turkgames

I made a program in C for my school work but i cant make it work.Piglatin means cutting the first character of a word and adding it to the end and finally adding an "a" to the end.For example teacher -> eacherta. Can you help me finding the problem? [code=c]/***************************************************************************************/ …

Member Avatar for WaltP
0
110
Member Avatar for mank

I want to pass a float array from one function to another function I want to make use of the float array type(here container) [CODE]void funct1() { float container[4]={0.1,0.2,0.3,0.4} void funct2() ----(1) {return container;} } void funct3() { void funct2(); use container array; }[/CODE] Here what would be the funct2() …

Member Avatar for mank
1
2K
Member Avatar for hotice187

hi I use Turbo C compiler in my school (Gujarat, India) Our course based on book E.balagurusamy there is no description of array like this int a[3,2] can ne 1 plz tell me how it is different from normal 1d array ? n how d values r stored in that …

Member Avatar for Salem
0
115
Member Avatar for cwtliew

Hello! I'm practising 2d-arrays for my upcoming test so pls help! i cant figure out what went wrong :((((( Q: A factory has 3 divisions and stocks 4 products. An inventory data is updated for each division and for each product as they are received. The current inventory data is …

Member Avatar for cwtliew
0
111
Member Avatar for the.alchemist

Hello. Here's my structure: [code=C] struct settings { char setting[40][255]; }; [/code] Here's the function that is supposed to take a pointer to an instance of the above structure and modify it : [code=C] void changeSetting(struct settings *tempSettings, char *newValue, int indexValue) { if( indexValue<40){ // to avoid out of …

Member Avatar for Salem
1
141
Member Avatar for donaldunca

I have small question: How can I create a random string from 'a' to 'z'? thank you!

Member Avatar for donaldunca
0
191
Member Avatar for jammy's

Hello can some one say how to use tracing in turbo c and to show the trace like we do manully is their any function how do watch options work plz say me i am a student and beginner in c guys help me experts professional and any one plz

Member Avatar for Fast
0
121
Member Avatar for appuguy

Hi could you please tell me how to print array elements with spaces. Please provide an example. I would like to see how a 2 D array is printed.Thanks a lot

Member Avatar for Aia
0
135
Member Avatar for crunchycrisp

For an assignment that im working on, we needed to accomplish the following: Asks the user for their name, accepts and stores the answer as a string. Opens a text file: questions.txt for reading �Opens a text file: studentName.ans for writing, where studentName is the one entered Reads each line …

Member Avatar for Aia
1
174
Member Avatar for theteamdrunk

I am trying to write a program that has to create a structure that has one variable called value and one pointer to the list(making it a linked list). It need to prompt the user for 5 values and store them into the linked list, then print out the list. …

Member Avatar for Duoas
0
124
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
196
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
277
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
349
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
144
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
129
Member Avatar for CornPoper
Member Avatar for eyehategod

[code] stdout.put( "Enter a number " ); stdin.getd(); [/code] lets say the user types "01020304" i need to look at every two digits(i.e. 01,02,03,04) and do some work with them. My question is how would i go about seperating these number so i can work on them?

Member Avatar for Ancient Dragon
0
70
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
127
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
459
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
176
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
508
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 Member #46692
0
139
Member Avatar for Barefootsanders

Hey everyone, I was hoping you could help me out in choosing or not choosing java for an upcoming project I would like to do. I would like to have my media library streaming from my home computer. So basically you would input a directory and it would gather all …

Member Avatar for nschessnerd
0
105
Member Avatar for stilllearning

Hi Everyone, I just wanted to introduce myself. I am a sw developer, work mostly with C, but there is so much that I still don't know ... hence the name :) . I came across DaniWeb while trying to learn how to do time complexity of algorithms. Its been …

Member Avatar for jasimp
0
54
Member Avatar for aswinikg

HI I am a newbie to 'C' and embedded application . I have a code in which the input parameter is being assigned in two ways (i) Runtime through user (ii) parameter tile the problem is, i can't give the runtime input as am a in need of creating a …

Member Avatar for aswinikg
-1
89
Member Avatar for sohanonline

hi....... i do have a doubt on this problem.please help me to solve it.here it goes........ [B]main() { int x=5; printf(“%d,%d,%d\n”,x,x<<2,>>2) ; } Answer: 5,20,1 [/B] now my problem is to know how the followin answer occurs?i know that its of rite shift and left shift which shifts the byte.can …

Member Avatar for sohanonline
0
85
Member Avatar for warpstar

Can someone please explain to me how dynamic memory allocation actually works? For example whast going on in the piece of code written below? If you can respond asap, that would be great. Thanks in advance. [code]p = (float *) malloc ( n * sizeof( float ));[/code] And whats the …

Member Avatar for Salem
0
242
Member Avatar for warpstar

Each of the following program segments might have syntax, logic or other kinds of errors. If there are errors, correct, otherwise answer "no error". Assume all function headers are correct. Function copy_array receives an integer array a and its size length, as parameters. It copies the array a into another …

Member Avatar for Ptolemy
0
190
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
115
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
87
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
132
Member Avatar for Basant sharma

I am currently studying in a private institute . i have done c,c++,java,vb,vb.net,javascript,vb script,xml.after doing such courses what job can offer to me. For What i can go for MCA or job.

0
18
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
130
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
390
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
365
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
140
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
153
Member Avatar for Member #127294

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
100
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
449
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
622
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
85
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
93
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
151
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
130
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
87
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
246
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
562
Member Avatar for Member #221552

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
365
Member Avatar for theteamdrunk

I need help with this problem. I have written the code. The function main() stores the message in an array. What I need to figure out is how to have the function restaurant accept the message as an argument(which is named menu) and display the message using pointer notation *(menu+i) …

Member Avatar for Aia
0
118

The End.