15,540 Topics

Member Avatar for
Member Avatar for c_ytsui

Hi all, I am new to C programming and need some of your help. I am trying to convert a string(ex. 25,000) to an integer. I use the atoi function to do the conversion, however, it only reads the initial portion of the string by stopping at the first non-numerical …

Member Avatar for jephthah
0
170
Member Avatar for riahc3

Hey I have to make the game War (card game: [url]http://en.wikipedia.org/wiki/War_(card_game)[/url] ) in C. Im not sure where (how...) to start. My basic thoughts/ideas/etc: Its a 40 (4 times 10) card version with 2 players. A way to do it would be set up a structure with 4 faces values: …

Member Avatar for jephthah
0
135
Member Avatar for abhigame

can any one tell me what are compiling errors and what are linking errors

Member Avatar for jephthah
0
90
Member Avatar for Isha20

I have to design a parser to convert Binary(HEX) File into number. I have to refer a format file for the same which is as follows: (Sr No;field_name;position;length;datatype;flag;) 1;TimeStamp;0;4;HEXA;0; 2;TimeOffset;4;4;HEXA;1; 3;Data_Vol;8;4;HEXA;1; ................so on.........it has 60 fields, which represent 1 record. Binary file: 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 Can you please help me coding this …

Member Avatar for jephthah
0
134
Member Avatar for SiRuS

Hello guys this is my code. [CODE] #include <stdlib.h> #include <stdio.h> #include <string> using namespace std; void charToBinary( char *value ) { unsigned int i; unsigned int alloc = (strlen(value)+1); int* cVec = (int*)malloc(alloc); for( i = 0; i < strlen(value); i++ ) { //works in windows but not on …

Member Avatar for Ancient Dragon
0
157
Member Avatar for the reaper

i know this sounds a bit n00b but can anyone tell me how to open a web browser in "c" because i am doing this project and i have to make a program that opens a web browser.. i need it to open the default internet explorer web browser and …

Member Avatar for the reaper
0
274
Member Avatar for vijaysoft1

Hi i am in a trouble please help me. in my program i had an array [CODE] int Maxwordcount[127]; int index=0; char ltr; char *typedword; char word[127][300][30] = { {............................................................}, // index = 0 {........................................................} // index = 1 ............ ................... ............................ {"a", "and", "apple","adobe","anvira","avast"}, // index = 65 {"boat", …

Member Avatar for vijaysoft1
0
340
Member Avatar for J-son

In this program, I cannot in put - integer. It outputs wrong result. What should I do to make it possible? Thanks heaps !!! [CODE=c] #include<stdio.h> int main(){ int num; int max=0; printf("Enter +/- integers or enter 0 to Exit \n"); while(1){ scanf("%d",&num); if(num==0) break; if(num>max) max=num; } printf("Max is …

Member Avatar for ArkM
0
86
Member Avatar for plike922

i need help with this program im getting this 1>selections.obj : error LNK2019: unresolved external symbol "void __cdecl displayArray(int * const)" (?displayArray@@YAXQAH@Z) referenced in function _main 1>D:\Documents and Settings\ERIC\Desktop\Projects\selections\Debug\selections.exe : fatal error LNK1120: 1 unresolved externals please help [CODE]#include <stdio.h> #include "genlib.h" #include "simpio.h" #define size 4 void sortArray (int …

Member Avatar for Aia
0
82
Member Avatar for ambarisha.kn

hi, i have some data in variables of different types.(short, int, long, float, char, double). now i have to create one pointer, have to allocate 1mb memory and have to store one by one in that pointer. How to do this.. plz give some clues to start.. which type i …

Member Avatar for ArkM
0
835
Member Avatar for T&T

Hello, I need your help in updating the loop in this code. the purpose of this loop is to open and read all data file in the programme area that has a name (passenger xxxx) where x is any number from 0 to 9 . please help me, [code]void Print_allPass() …

Member Avatar for T&T
0
259
Member Avatar for harshchandra

is there anyway to print out any string on stdout without using semicolon at the end... ?? plzz reply

Member Avatar for Nick Evan
0
394
Member Avatar for francisprite

Hello there.. Can anyone give me an idea for a fun project in C? I just need something that will keep me busy and pretty much entertained. It's also for practice. What I mean when I say a fun project is something like the last Machine Problem I made. It …

Member Avatar for onkar81
0
176
Member Avatar for jobs

Line by line I need to get the whole content in a line from a file. I have looked at fgetc, fgets. According to fgets, I need to specify max number of characters to read. If I have file content like this: 1235690,9087657788888770000,89977553223456789\n I wouldn't know how max characters in …

Member Avatar for Narue
0
261
Member Avatar for ml2662

I am having trouble with the following program. I am trying to create a linked list that behaves like a FIFO queue. I need to be able to add new items to the end of the queue and remove them from the front. My confusion is with trying to use …

Member Avatar for findsyntax
0
168
Member Avatar for kneiel

how many processes will be created when i fork() twice . Is this logic correct ? the 1st fork will spawn child C1 which is a child of the parent process P. the code segment of the parent P is inherited by C1. the 2nd fork is called by both …

Member Avatar for Salem
0
87
Member Avatar for cusa

Hi, I have a problem with strtok(). I have string in this form 2000;ON_0;1000;ON_2; and when I execute this code: [code=c] for ((p=strtok(Seq_String,";"));p;(p= strtok(NULL, ";" ),n++)){ foundThings[n] = p; Send_String_pc("\xd\xa\xd\xa"); Send_String_pc(foundThings[n]); } foundThings[n]='\0'; [/code] I get : 2000 ON_0 10 It is C code for microcontroller and this is not …

Member Avatar for cusa
0
134
Member Avatar for basukinjal

Suppose i have a random permutation of 0,1,...., N-1. Now if i want to get the identity mapping from this can i do anything better than sorting?? I mean, sorting does not take into fact that all nos from 0 to N-1 are in the array or not. But in …

Member Avatar for ArkM
0
119
Member Avatar for plfgoa

Hi, I have been trying to profile code by putting in timing function at the start and end of the function(a function may call some other function and so on ) just before the return statement if the function returns something. The time is calculated in milliseconds. I wanted to …

Member Avatar for Salem
0
131
Member Avatar for ovais2k1

I need 2 programs in C language 1.Which create a Box and in a square box it takes input from user and print with in the box.I have made a program but when i take input the box corners are breaking from left and right side please help in in …

Member Avatar for ovais2k1
0
133
Member Avatar for bincy ashok

Assume that a language uses /* and */ pair for comments.Write a C program to check for balanced /* and */ pair in a given text file.Use pointer implementation of the data structure.

Member Avatar for WaltP
0
92
Member Avatar for A_Obrzut

[code] void HandleTCPClient(int clntSocket) { int recvMsgSize; char echoBuffer[32]; char test[32]; char reply[32]; memset(&echoBuffer,0,sizeof(echoBuffer)); memset(&test,0,sizeof(test)); memset(&reply,0,sizeof(reply)); if((recvMsgSize = recv(clntSocket, echoBuffer, 32, 0)) <0) { DieWithError("recv() failed."); } while (recvMsgSize > 0) { if(send(clntSocket, echoBuffer, recvMsgSize, 0) != recvMsgSize) { DieWithError("send() failed."); } if((recvMsgSize = recv(clntSocket, echoBuffer, 32, 0)) <0) { …

Member Avatar for A_Obrzut
0
108
Member Avatar for T&T

Hello, I need your help in this programme. The programme is explained in the attachment file. the main problems are: 1) how can I get specific data from a data file. (as required in 3,4,5 and 6) 2) how can I solve the problem of over written the data file …

Member Avatar for ithelp
0
63
Member Avatar for plike922

I am learn about using arrays and i need help [CODE]#include <cstdio> #include "simpio.h" #include "strlib.h" #include <iostream> using namespace std; #define Max 6 int main() { int power2[Max], i, n; for (i=1; i<=32; i++) { power2[i] = i; i = i*2; } for(n = 0; n<=Max; n++) { printf("%d …

Member Avatar for Aia
0
78
Member Avatar for omdnaik

Hii there Can ne tell me how to compile and run a C prog. using microsoft VC++... Till now i have been using Turbo C++ Compiler...

Member Avatar for Ancient Dragon
0
134
Member Avatar for loimarie

Hi!i need your help.please help me solve my assignment in numerical analysis,our teacher asked us to get the derivative of a function using turbo c programming language.I really don't have any idea on how to solve this. The equation would be like this [COLOR="Red"]f(x)=3x^2-5x[/COLOR].In this program, the user is asked …

Member Avatar for loimarie
0
157
Member Avatar for swamy kavitam
Member Avatar for Salem
0
57
Member Avatar for wussa

This is in c programming. The question is not with me right now but its like this, the program wants me to input 10 numbers and then find the average,total,maximum and minimum, Then print back the numbers according from lowest to highest. I'm having a bit of difficulty doing it …

Member Avatar for paragt
0
161
Member Avatar for keithmolo

Please let me know if this is possible or even remotely possible! I need to write to a file, but directly to hex. For example, if I write "2D" to the file, i want to be able to open the file in a hex editor and see "2D" in the …

Member Avatar for jephthah
0
187
Member Avatar for lynlyn

please help me with my problem... i have here a running program...but then you have to press the keyboard twice in order to input data.. can you help me to modify my source code???please..my future depends on you...-_- specification: Accepting data in the lists should only terminate only if the …

Member Avatar for jephthah
0
175

The End.