19,876 Topics

Member Avatar for
Member Avatar for Sanchez10

Would anyone be able to help me get started on writing a program to implement a page-replacement algorithm suchs as FIFO?

Member Avatar for vas555552006
0
73
Member Avatar for alsoumhi

Hi guys, how are you? I need your help in a tic tac game, I have created a program that asks a user to specify first the index whether [0][0],[2][1],[2][2],etc..and to enter the char letter either 'x' or 'o' but I don't know where is the wrong? can any any …

Member Avatar for Ancient Dragon
0
108
Member Avatar for tehloki

I'm trying to implement a Double-Linked List ADT in an array (contiguous memory only, no dynamic allocation at runtime). So far, all my code does is generate a seg fault whenever I try and add a new element. Here's the whole ADT, if anybody feels like looking over it. FILE: …

Member Avatar for Narue
0
126
Member Avatar for dc101

Hello, I can't seem to find any example code where a 2-dimensional array is returned from the function. This is my code: [code=C] char *updateBoard(char board[3][3], int position, char piece){ //board is changed here //want to return new board return board; } [/code] any suggestions are much appreciated.

Member Avatar for alsoumhi
0
91
Member Avatar for aldebaran31

I have written a program in c. It's relatively simple, but I need to learn how to write a help file that can access the documentation within the program and output it, for example, I would like it that if the user were to type help input at the command …

Member Avatar for Salem
0
81
Member Avatar for ubercat

Hi all. I'm a new member [I]I posted the following in the stickied book thread as it seemed the most appropriate place for it. That was 2 days ago and no one responded so I probably guessed wrong. If I shouldn't have reposted, then I'm sorry. Here is the post …

Member Avatar for kako13
0
114
Member Avatar for zandiago

The assignment is : Write a C++ program that calculates the volume of 3 different geometric shapes. Your program should give the user a menu like the following and repeat until the user wants to stop. Volume Calculation Program Select the Number of Your Chosen Object 1. Dumbbell 2. Axle …

Member Avatar for zandiago
0
195
Member Avatar for muhammad amir

hi, in my last lecture i had faced a quiz, it was related to two dimensional array.i was unable to solve it.the question is "you are required to find a generic formula of the two dimensional array that how memory is being allocated for two dimensional array ?how compiler know …

Member Avatar for jotsaroop
1
115
Member Avatar for psyman_86

Hi, Im trying to implement a LCD screen as part of a engineering design project. The screen is to be connected to a M16C/62 microcontroller. In order to compile the software I am using the NC30WA V5.20 Release 1 compiler, as it is the compiler which comes with the development …

Member Avatar for psyman_86
0
265
Member Avatar for GRaymer

I'm a student working on an internship, without a lot of guidence. I went to develop a program with C# not realizing that as a developer in the organization I have a different standard desktop than the rest of the organization. So on my computer I was able to develop …

Member Avatar for GRaymer
0
104
Member Avatar for berty_xx

Hi, i need calculate date and time from Timestam received from NTP server. Can you help me with alghoritm? NTP stamp is numbers of second from 1.1.1900..... Best regards Peter

Member Avatar for Salem
0
57
Member Avatar for csteverun

Would anyone be so kind as point me to a resource that explains how to make calls to a DLL from a C program? My Google skills have failed. I found many web pages talking about how to CREATE a DLL, but none that explain the minimum code needed in …

Member Avatar for Salem
0
122
Member Avatar for furpacino

oke i am sorry for before i didnt know about this side so much. Now i am sending a file with attachemnt. I have to rewrite this while loop. if you help me i will presuade about your helps.

Member Avatar for Aia
0
115
Member Avatar for Bikram

helos...!!! wel am new to dis..!!! but i hav a code to it...!!! lets try out..!!!!! [code] #include<stdio.h> #include<conio.h> void main() { int i,j,count=1,flag,arr[5],p[5]; for(i=0;i<5;i++) scanf("%d",&arr[i]); p[0]=arr[0]; for(i=1;i<5;i++) { flag=0; for(j=0;j<=count;j++) { if(arr[i]==p[j]) flag=1; } if(flag==0) { p[count]=arr[i]; count++; } } for(i=0;i<count;i++) { printf("%d\t",p[i]); } getch(); } [/code] try dis …

Member Avatar for Narue
0
125
Member Avatar for bodikon

So on my desk, i have nothing but a computer running Windows XP SP2. I want to connect a usb connector into my computer, into a component board with an LED. Then I want to create a program in C# command line that I can turn the light on and …

Member Avatar for Ramy Mahrous
0
113
Member Avatar for maye13

I need to create a C program that goes like this: The user wil enter the number of seconds that the stopwatch should run starting at the equivalent time in hours, minutes and seconds of the input. The stopwatch runs until the time becomes 00:00:00. I don't want you guys …

Member Avatar for maye13
1
2K
Member Avatar for placo23

Hi, I'm pretty new in this forum and also new in C development. I was wondering if there's a way to play rm/rmvb files in a C application. I did a bit of research but without any success. Can somebody help me here? [B]UPDATE:[/B] Just as un update, I wanted …

Member Avatar for Salem
0
139
Member Avatar for need_ur_help

i hav made a linux based proxy sever in C in which a separate thread is invoked for each clieant but when a client request a page which is cached and a function reads its file, in mean time another client requests any page then a segmentation fault occurs. all …

Member Avatar for prabhat padhy
0
39
Member Avatar for kemboy

hey can anyone explain this code to me, i am trying to understand it for days now but i still cant figue it out its the code of "the towers of hanoi"........it goes like this... [COLOR=#0000ff]#include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<stdio.h>[/COLOR] [COLOR=#800000] [/COLOR][COLOR=#0000ff]void[/COLOR][COLOR=#000000] hanoi([/COLOR][COLOR=#0000ff]int[/COLOR][COLOR=#000000] n,[/COLOR][COLOR=#0000ff]char[/COLOR][COLOR=#000000] from,[/COLOR][COLOR=#0000ff]char[/COLOR][COLOR=#000000] aux,[/COLOR][COLOR=#0000ff]char[/COLOR][COLOR=#000000] to) {[/COLOR] [COLOR=#0000ff]if[/COLOR] (n==0){ [COLOR=#0000ff]return[/COLOR];} hanoi(n-1,from,to,aux); printf([COLOR=#800000]"\nMove …

Member Avatar for Salem
0
93
Member Avatar for megan-smith

what is a newline character and what does it do? for example, what does " variable != '\n' " mean? And is there any other way to write" if (variable != '0' && variable != '1' && variabel != '\n') "? I've tried " if (variable < '0' && variable …

Member Avatar for megan-smith
0
136
Member Avatar for theraven1982

Hello, i'm still trying to learn C, and I have a new question ;). I want to declare a struct, and use a function to manipulate the entries. If I change the values within a function it's ok; however, when i access the members outside the function, they're not defined …

Member Avatar for theraven1982
0
21K
Member Avatar for horntastic

I am using Turbo C++ for Windows, version 3.1 at home. At school, we are using a similar version (maybe 3.0 or 3.1), but with a more blocky display. (with block cursor and stuff. my one at home looks more... modern) [EDIT] The school version is Turbo C++ 3.0, possible …

Member Avatar for horntastic
0
153
Member Avatar for abhishekgahoi

#include <stdio.h> int main() { int i=5; printf("%d %d %d %d %d", --i,i--,++i,--i,i); return 0; }

Member Avatar for Aia
0
181
Member Avatar for thyagarajan

i am developing an online auction system in c......can someone pls help me to help me setup a timer that runs in the background (or) i dont know how to store the time/date so that it can be compared with current date/time..... Thanks

Member Avatar for Ancient Dragon
0
351
Member Avatar for sakthi_2001

Hi all, I am new to C programming, can anyone help me out with a solution to find sum of digits of a 5-digit number without using control statements, like if, for... thank you

Member Avatar for twomers
0
719
Member Avatar for aldrinsms
Member Avatar for Salem
0
90
Member Avatar for zandiago

I need a head-up on this program....i really don't know where to start....however for section one, i'm guessing we'll have to use for loop from 1000 to 9999...because of the fact that they show the range of the samllest to largest 4 digit #'s. In section two I guess we'd …

Member Avatar for zandiago
0
247
Member Avatar for megan-smith

hey there; i wanted to write a program to convert binary to decimal. i did that using the " character approach". it works just fine. then i decided to enhance the program by adding an error message whenever the input are invalid (i.e anything other than 0, 1 ), but …

Member Avatar for Salem
0
126
Member Avatar for zandiago

Good day: There have been similar posts to my question...but i don't see what I'm doing wrong. Our professor wanted us to use a switch/case statement, we started transversing a string....The assisgnment : Write a program that will read in a one line phrase from a text file named “vowels.txt”. …

Member Avatar for zandiago
0
201
Member Avatar for csteverun

This program create structures of the type "pf_space" and allocates memory as they're created. The problem is, it doesn't work like the book. malloc never returns false and therefore you can continue making structures until the program crashes. On my PC, I tracked down the offending line. After creating 1034 …

Member Avatar for csteverun
0
109
Member Avatar for Deb_2007

I am trying to inflate using zlib. The data is from a network packet contaning only unsigned charecters in QP encoded form eg, 1F=8B=08=00=00=00=00=00=02=FF=A5X=FBw=DA8=16=FE=BD=7F=85=AAlyL=00C=DE=03=98=9C=B6i=13f=BBm=A6=ED=9Cvg=1F=1C=D9=16=B6&=B2=E4=C82=84M=F9=DF=F7J=B2=81=90G=BB=B3=C9=01=AC=C7=95=AE=EE=FD=EE=A7{=3DLt=CAG=C3=84=92h4L=A9&(=D1:k=D3=EB=82=CD|=1CJ=A1=A9=D0m=BD=C8(Fe=CB=C7=9A=DEh=CF=08=0EP=98=10=95S=ED=FF=F6=F9m=FB=04=8F=86=9AiNG=E7R=C6=9C=0E=3D=D7=1A=E6za~=9E=B7=DB=CF=02=19-Z:j=91V=D6=EA$=B7SX=B2=3D%)=E3=8B>Q=8C=F0VND=DE=CE=A9b=D3=E5=B3jB=CE=FEC=FB{=DD=EC=C6v=85=92K=D5=DF=D9 ...............etc. After reading the file I have stored the data in an array of unsigned charecters. eg, usgned charecter arr[....]; then my array contains arr[0]=31,arr[1]=139,arr[3]=0 and …

0
58
Member Avatar for fatihpiristine

Hello guys, I want to improve up my skills programming in C and Phyton on Linux. I have no idea which version of Linux is good to do this. So far I have tried Fedora 7, Slackware and StartCom Enterprise. I couldnt find what I really want. Few years ago …

Member Avatar for Salem
0
101
Member Avatar for hanifa

I have already posted this on Mathworks website, but currently till now nobody has been able to solve it. Basically, I want to port over matlab code in .m format so I can call the matlab functions from a C code. I just followed a walk-thorough from matlab website and …

0
78
Member Avatar for BigFormat

Hi guys, I've to read a txt file and produce a statistic of each alphabetic char occurrence. I'm approaching this task reading char by char until EOF and using an int array to hold the number of occurrences of each character read so far! So that's my solution: [code] int …

Member Avatar for Salem
0
435
Member Avatar for srikanth329

Hi I have an binary of 10 bits . How do i change it to decimal suppose binary is 1000000001 . I need to get the decimal of it . Can some body gimme the psedocode??

Member Avatar for alsoumhi
0
286
Member Avatar for alsoumhi

Hi,guys how are you I just want to ask in c programming that how to return a string to a main function thanks.

Member Avatar for Rashakil Fol
0
106
Member Avatar for jacques95

Hello im trying to learn c++ but cant find a program to use. I dont really know what to write on so can anybody tell me? thanks :)

Member Avatar for jacques95
0
144
Member Avatar for Drew06

I can't seem to figure out the syntax error on this one, it says the error is at the end of the input.... #include <stdio.h> #include <math.h> int determine(int); void main(void) { int num1, even, odd; printf("Enter a number: "); scanf("%d", &num1); printf("The number is: %d", determine(num1)); scanf("%d", &num1); getchar(); …

Member Avatar for Drew06
0
76
Member Avatar for jhen
Member Avatar for gidos

what book will i use for internet opening and function with using visual c++ 6.0 compiler please help me gidos

Member Avatar for Aleckaola
0
25
Member Avatar for Metsfan147

I'm curious as to why the following trivial example does not work: file: new.c [code] #include "new.h" void test( char * x ) { free( x ); } [/code] file: new.h [code] void test( char * ); [/code] file: weird.c [code] #include "new.h" int main( void ) { char * …

Member Avatar for Salem
0
106
Member Avatar for khalid0404

the new algorithm will consist of combining Huffman and Shannon-Fano coding system, which will be later translated in C language. Any proposals???

Member Avatar for khalid0404
0
114
Member Avatar for ScaryMan

Hello, I don't know if such a program exists but, I have an idea and I wonder whether this is available in C or not. Think a program and a forum. There are members on forums. You enter nickname of one of, or more, members to the program. It starts …

Member Avatar for GreenDay2001
0
102
Member Avatar for theraven1982

Hello, Since you all helped me so well the previous time, I have a second question for you. I think it's fairly simple, but for some reason I can't find the answer. I want to write to a file, in a certain format; however, it doesn't write it exactly as …

Member Avatar for theraven1982
1
765
Member Avatar for rogelioz

Hi, I'm having a problem using GCC 3.4.2, I'm getting 2 warnings at these lines: [code] int check_format(char array[]){ int i= 0; -------->while(array[i]!='\0'&&array[i]!='\n'){ --------->if( (!isdigit(array[i])) && (array[i]!=' ') && (array[i]!='-') && (count==9 && array[i]!='X') ) program.c:50: warning: subscript has type `char' program.c:53: warning: subscript has type `char' [/code] On GCC …

Member Avatar for Narue
0
266
Member Avatar for navychat

Hello, can anyone help me with my homework? I seem to be stucked with this problem. "Write a program that reads three strings and prints only those strings beginning with two vowels." example input string 1: eavesdropping input string 2: elevators input string 3: either Output: eavesdropping either Thank you …

Member Avatar for Narue
0
100
Member Avatar for tractionmate

Hi guys, i was wondering if any one has any material on fixed point implementation? Thanks

Member Avatar for Salem
0
322
Member Avatar for gaowei

[code=c] /***头文件(.h)****/ #include "stdio.h" /*I/O函数*/ #include "stdlib.h" /*其它说明*/ #include "string.h" /*字符串函数*/ #include "conio.h" /*屏幕操作函数*/ #include "mem.h" /*内存操作函数*/ #include "ctype.h" /*字符操作函数*/ #include "alloc.h" /*动态地址分配函数*/ #define N 10 typedef struct nw /*定义数据结构*/ { char word; /*生词*/ char acceptation; /*词义*/ char aspirate; /*音标*/ int no[N]; /*序号*/ char note; /*注释(包括词性,例句等)*/ struct nw *next; }NEWWORD; …

Member Avatar for Aia
2
177
Member Avatar for Solidsteel86

Greetings, first time I've posted here. Forgive me if I touch on any taboos unique to this forum. My teacher isn't very good and my textbook is virtually useless or I wouldn't be seeking help on the internet. I did read the homework sticky, though. It's basically an exercise in …

Member Avatar for Solidsteel86
1
143
Member Avatar for MattEvans

I'm working on a C++ module to read wavefront OBJ files; these are text files with many lines with either 2, 3, or more integer or floating point numbers; separated by spaces or tabs. It's not always possible to know how many numbers there will be in a single line …

Member Avatar for Narue
0
139

The End.