19,876 Topics

Member Avatar for
Member Avatar for mevanga

Can someone help me to write a code in C Programming that will ask the user to enter a PIN and if the PIN is entered 3 times wrongly the program should exit. Thanx in advance.......

Member Avatar for mevanga
0
125
Member Avatar for mohd9789

Hello, I'm working on a project for my master degree that uses codes called CurveLab [url]http://curvelet.org/software.html[/url] I don't know how to install it to my system. I tried to follow the steps but I filed to do so. Can anyone help me with doing that? I'm really in need to …

Member Avatar for mohd9789
0
94
Member Avatar for kandimalla

how to put the combobox in that gridview.when we select the combobox then display the another combobox values in that datagridview. data retrive from the database. i want the datagridview colums is: Sno ProductsName Items Quantity Total. ProductName is one combobox and Iems is another combobox.when we select the productname …

Member Avatar for sknake
0
159
Member Avatar for no1zson

I am new to C programming and have been using the GOTO all over the place until today when I was informed it is not preferred practice, and due to its adverse affects on debugging and maintenance should only be used in the rarest of cases. I can understand that …

Member Avatar for hket89
0
151
Member Avatar for hket89

/* File: Kilowatt-hours.c Calculate and print bills for the city company.*/ #include <stdio.h> int main() { int account_number; char code; double bills, kilowatt_hours, peak_hours, off_peak_hours; printf("Please enter Your account number: \n"); scanf("%d", &account_number); printf("Enter Your user code [R/C/I]: \n"); printf("R = Residential\n"); printf("C = Commercial\n"); printf("I = Industrial\n"); printf("\nCode = …

Member Avatar for DangerDev
0
303
Member Avatar for revenge2

hey guys how would i figure out if a string has a number in it without using any aditional libraries?

Member Avatar for Hiroshe
0
5K
Member Avatar for basitchk
Member Avatar for Stefano Mtangoo
0
83
Member Avatar for lecotti

Hello, having a bit of trouble with this. I am writing a program which sorts a sequence of numbers using a binary tree however i cannot to seem to get it to work; i belive it is something to do with passing the digits to makenode(). Any help would be …

Member Avatar for lecotti
0
96
Member Avatar for yasaswyg

Can anyone tell me whats wrong with the code. I get two errors. I dont know how to fix it [code] #include<stdio.h> typedef struct { int i; float f; } STR; void fun(FILE*, int); void main() { STR* sp; int x; printf("Enter number of record to be printed: "); scanf("%d", …

Member Avatar for wildgoose
-1
94
Member Avatar for yasaswyg

I need to write a function that traverses a general list and deletes all nodes that are after a node with a negative key. But I dont know where to start so can I get some help

Member Avatar for yasaswyg
-1
122
Member Avatar for des6043

what's wrong about this? why when i compile,it come out expected primary-expression? what is that? [code=c] #include<stdio.h> #include<conio.h> main() { float Lab,Mid,Pro,Quiz,Final,Total; printf("\nEnter your mark for Lab:"); scanf("%f",&Lab); printf("\nEnter your mark for Mid Exam:"); scanf("%f",&Mid); printf("\nEnter your mark for Quiz:"); scanf("%f",&Quiz); printf("\nEnter your mark for Project:"); scanf("%f",&Pro); printf("\nEnter your mark …

Member Avatar for des6043
0
158
Member Avatar for buddyholly

I'm trying to get a user input number from text box on my GUI, then there are some calculation for that number and display it later in the same text box. Number entered is supposed to have hyphens which are then stripped to check for validity of that ISBN number. …

Member Avatar for ddanbe
0
702
Member Avatar for k007

If I want to create an associative array in C++ without the use of std::map, what are the possibilities? I want to set it up as a template so that it can be used with various datatypes. Example: Array<int> // (associative array), and then be able to insert elements into …

Member Avatar for mrnutty
0
112
Member Avatar for patrick k

Hey everybody, I was trying to create a program that simulated the game "Mastermind" using numbers 0-5 instead of the six colored pegs. I have written out the code, and it seems to work, all except for the loop I have set to see if the user wants to play …

Member Avatar for Hiroshe
0
252
Member Avatar for sara9111

[COLOR="Red"][B]How i solve this problem ?? i try, but i don't know wts the wrong??[/B][/COLOR] A.Write the defintion of function one so that it returns the sum of x and y if x greater than y, it sholud return x mines 2 times y. B.Write the defintion of function two …

Member Avatar for jesseb07
0
122
Member Avatar for guyod

Hello, I am learning C, POSIX, and Unix. I am trying to write a code that wait until the child process is done then terminate, however, I do not know what to put in the while loop. [CODE] Parent function: signal(SIGCHLD, handler) while(child process is running) print the number of …

Member Avatar for guyod
0
167
Member Avatar for DoEds

In this program i want to ask the cashier if the customer wants to buy anything else. Typically, Ask customer what beef product he wants to buy. Ex. 1 //Chicken Liver Ask customer how many kilo(s) he will buy. Ex. 2 //2kg (problem) Then ask the customer if he wants …

Member Avatar for abhi.navale
0
470
Member Avatar for NRaf

*sigh* Malloc get's me every time... Basically what I'm trying to do is read data from a file to populate a square array on integers. I'm declaring the array as 'int** matrix' in main(). I pass this to the function which handles reading the file (the parameter for the function …

Member Avatar for Dave Sinkula
0
90
Member Avatar for yasaswyg

This is a short summary of my project make two text files with random stuff in it and then make them into bin files and then merge them into one and u take two text files and combine into one text file the code is pretty damn long #include <stdio.h> …

Member Avatar for Hiroshe
0
151
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
83
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
82
Member Avatar for zimis

Hello, I'm trying to make client program which connects to server, and comunicates with it for unlimited time. SOCK_STREAM (TCP). Is there a way to change the way of getting server messages? Now it's just infinite loop. (I think thats not good, and requires a lot of CPU cycles) [CODE=c] …

Member Avatar for Salem
0
309
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
120
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
95
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
59
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
81
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
129
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
136
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
168
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
176
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
329
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
287
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
107
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 kamo10

can someone help me, i want to use c++ and MS-Access as the database so when i use the SQL component instead of the Table i get an error

Member Avatar for Ancient Dragon
0
87
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
185
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
98
Member Avatar for laconstantine

I am very interested in ASM I wana learn write it and read it like a pro.. Now i'm in CLASS issue I want to know how c++ Class definition looks in ASM code.. for example this code [CODE] class MathFuncs { public: int a,b; private: void SetVars(int,int); }MathObject; void …

Member Avatar for kvprajapati
0
108
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
121
Member Avatar for barker1889

Ive got a class which i want to use within a c# windows application, It sounds really simple but where do i put the code which creates the class object and the code that uses the class? Ive tried it in most parts of the code but after creating the …

Member Avatar for ddanbe
0
187
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
73
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
91
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
172
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
168
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
115
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
173

The End.