15,552 Topics

Member Avatar for
Member Avatar for yasaswyg

this code takes out the spaces in between and i want to shrink this code a bit. like in function modify. It doesnt work if i take out the `if(s[i] == ' ')` I want to make this code work without using that. Any help?? #include<stdio.h> #include<stdlib.h> char* modify(char*); void …

Member Avatar for wildgoose
0
81
Member Avatar for makavelixx

This is an assignment for my class, any links to where I can find out what my teacher is trying to get us to learn would be great. I am suppose to keep everything the same and just fix the commands so they work. [CODE]#include <stdio.h> #include <stdlib.h> /* MAIN …

Member Avatar for wildgoose
0
80
Member Avatar for notsogood

Hi I kinda forgot my old account for this forum coomunity and I wanted to post a problem about the POS I am developing with C. The program allows you to read a certain file (inventory.ini) , add items to it, view the items, edit contents and delete. Here is …

Member Avatar for yellowSnow
0
117
Member Avatar for waqarafridi

Hello Every one Does any One know the format specifier for BYTE. so that it can give me Binary output.

Member Avatar for wildgoose
0
92
Member Avatar for dekaya

Hi I was experimenting with a simple mouse cursor change that was previously posted. Can anyone tell me why it fails to work under DEV-CPP The code has all the calls commented out except the last one to demonstrate the hourglass appearance. remark out the last call and the hourglass …

0
58
Member Avatar for patrick k

I promise I tried to look this up before I came to ask you guys, but the resources I found never answered the question.... Is it unusual for a variable made in a function to be invisible to another code block in the same function? I use Dev C++ and …

Member Avatar for Salem
0
78
Member Avatar for carlcarman

my program needs to have the user enter a string and have it output backwards, not in reverse order. This is what I have so far, any help would be appreciated. I was trying to use memmove but I think I'm going in the wrong direction. Thanks Carl. [CODE] #include …

Member Avatar for wildgoose
0
126
Member Avatar for Dream2code

Can any one suggest me how to read EBCDIC Files (which generally comes form mainframe systems) using C. EBCDIC:Extended Binary Coded Decimal Interchangable Code (not sure about the full form)

Member Avatar for yellowSnow
0
1K
Member Avatar for MrNoob

hello i have last problem with strings i dunno whats wrong with this i dont get sometimes the logic coz when i write the program i do it into smaller stuff but this rlly string stuff drive me insane i hope i m gonna master it in the end anyways …

Member Avatar for MrNoob
0
134
Member Avatar for compubaba

What exactly is meant of by associativity(right to left / left to right) mentioned on p53 of K&R 2nd edition. The book mentions that in X= f() + g() f may be evaluated before g or vice versa . But in the table it has been mentioned that () has …

Member Avatar for Salem
0
160
Member Avatar for riyas_26

Going to attend interview in few hours pls i need some basic questions with answers in C Dont send links pls sirs i am fresher..

Member Avatar for DangerDev
0
173
Member Avatar for Hiroshe

I'm seeing if it is possible to write a pong game only using standard C with maximum portability. I've worked out everything except user input. When the game is playing, If the user has no key pressed down, the paddle does not move but the ball should keep moving. I …

Member Avatar for Duoas
0
2K
Member Avatar for no1zson

What exactly does the "Return 0;" indicate in this function? I know my code will not even compile without it, but I have just been putting it in out of habit without realizing that I do not even know what it does. I was under the assumption that it meant …

Member Avatar for no1zson
0
326
Member Avatar for anithaca_333

Can any one please give me C implementation of the problem immediately if possible: In a field there are four animals, a dog, a snake, a mouse, a mongoose..dogs kill mongoose mongoose kills snakes and snakes kill mice.. The speeds of the mouse snake mongoose and dog are respectively 8, …

Member Avatar for anithaca_333
0
257
Member Avatar for samli88

i tried to read integer values from a file but it didnt work. fscanf could only read strings.. why? or am i not doing sumfin ryt?? here's my code: int a=0; FILE *p; p = fopen("Customer_Records.txt", "r"); while(x==a); { fscanf(p, " %[^\n]", profile[a].name); printf("\n %s", profile[a].name); fscanf(p, " %[^\n]", profile[a].phone); …

Member Avatar for Aia
0
105
Member Avatar for lecotti

Hello, simple program here i can't seem to get to work. In a nutshell the program reads characters into an array using getchar and then prints them in a loop, although the numbers printed are not the ones i entered! thanks in advance [code]#include <stdio.h> #define MAXSIZE 100 /*max array …

Member Avatar for lecotti
0
2K
Member Avatar for GarveyDesign

I have attached the latest listing of the program in question. It is actually parse.y but had to be uploaded as parse.txt. When I run Bison now, then the messages I get from that are... parse.y: warning: 8 useless nonterminals and 30 useless rules parse.y:52.1-7: fatal error: start symbol grammar …

Member Avatar for markhurd
0
2K
Member Avatar for farhan.foxtrot

Compiling the following problem with visual studio 2000 gives the errors: temp.obj : error LNK2001: unresolved external symbol "void __cdecl ungetch(int)" (?ungetch@@YAXH@Z) temp.obj : error LNK2001: unresolved external symbol "int __cdecl getch(void)" (?getch@@YAHXZ) Debug/temp.exe : fatal error LNK1120: 2 unresolved externals Error executing link.exe. The code is taken from Dennis …

Member Avatar for 9868
0
181
Member Avatar for nandini vishuu

can anyone tell me how to write a programme to print numbers in following fashion 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1

Member Avatar for Hiroshe
0
95
Member Avatar for MV89

I am creating a program which performs statistical analysis of an array. So far i have got an enter array, that gives the min, max and median values and sorts the array. I have not been able to work out the mode. I have been able to find the mode …

Member Avatar for MV89
0
120
Member Avatar for rakesh_01

Hey guys, I'm RAKESH....i need to write a C program to display the pagesource of a webpage..... I came up with this piece of code [code] #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <netinet/in.h> #define BUFFER_SIZE 9999 #define HOST_ADDRESS "74.125.127.100" #define HOST_PORT 80 int ReadData(int Sockfd,char *buffer,unsigned int …

0
71
Member Avatar for XMyKillX

This program is meant to read in strings, calculate the average word length then printout all the strings that are greater than the average. My issue is with the function in red, i'm not sure how to call it or make it work, it doesnt like the strlen parameter nor …

Member Avatar for yellowSnow
0
89
Member Avatar for DoEds

//Make an interactive program that will ask for hourly rate of the employee and the number of hours worked in a day. As DOLE mandates, more than 8 hours of work a day is considered OT (overtime) so the wage will be 1.5 * hourly rate after the 8 hours …

Member Avatar for DoEds
0
169
Member Avatar for taikoprogrammer

Hi Everyone, I need some help. So I am given this code and I have to make the functions for revArray, *reveElement, and evenOdd. So far I have figured out how to reverse the Array and print it. But I'm having some trouble sorting the array. I'm supposed to put …

Member Avatar for yellowSnow
0
1K
Member Avatar for yeshkadiyala

Hello... Im a newb to both C programming and DaniWeb .. the prob is tht i try to compile this program in TurboC3 #include <stdio.h> #include<Conio.h> main() { printf( "hello" ); getch(); } when i press " alt+F9 " it says " Warning:: program should return a value" and no …

Member Avatar for Salem
0
164
Member Avatar for patrick k

Hey everybody. I'm writing a program that simulates rolling two dice and adds them up, eventually printing out the number of times each possibility (2 - 12) was rolled. The number of times the two dice are rolled is specified by the user. The code I've got so far compiles, …

Member Avatar for patrick k
0
110
Member Avatar for MrNoob

Hey its me again i dunno this string stuff gonna drive me insane really been doing since yesterday exercises on string did half of them but i have this program which should remove chars that i specify and when i test with putchar it does remove them but The string …

Member Avatar for MrNoob
0
170
Member Avatar for sgauravv

Hello team, We are working on speaker indicator, which is supposed to indicate the level of volume received from VLC player. I have worked on microphone, in microphone we can able to get the input buffer and according to that we are able to display the level of volume. I …

Member Avatar for MosaicFuneral
0
109
Member Avatar for no1zson

Hey guys, maybe I am just worn out today, but can somebody look at my IF loop (the first one for selcting 1-3) and see where I am going wrong? Everything else seems to be pretty good I think, but this is aggravating me to no end. Thanks [code=c] #include …

Member Avatar for no1zson
0
189
Member Avatar for MrNoob

Hello i m suppose to make a function that fetch the strings according to num and it will stop when num is finished or it encounter , or ' ' or newline i made the function but its acting weird as if there is a \0 placed in [code] #include …

Member Avatar for Dream2code
0
227

The End.