15,551 Topics
| |
hello Is there any way to change numeric to figures? for example if the user input is 134, the program output must be one three four. thanks in advance, Bluebird | |
Hello to alll programmers out there. Here i am trying to design a custom pascal triangle where the user can specify the TOP ELEMENT as well as both the CORNER elements. The problem i am facing is that the prog works well till the 3rd row but starts giving rubbish … | |
I'm trying to complete a radix sort program, and i cant remember the algorithm to get the specific digit out of a number between 1 and 10000 heres the for loop which calls getdigit: [code=C] for( i = 0; i <= 4; i++ ){ printf("Pass %d: ", i ); for( … | |
connect() system call fails while client tries to connect to a server givin duplicate name error.Can you please suggest me a way to remove this error? Also I would like to know can we check if a socket is closed or not? how to ensure that a socket is closed. … | |
Hi I have doubt . Can we return the some data from boolean Function in C For Example [code=c] bool add( int a, int b) { int C; C = a + b; return C; } [/code] Is it possible in C | |
My program is getting hung up somewhere in the function [ICODE]evolveRealization[/ICODE] and while it is stuck its memory usage is increasing by around 1MB per second! While it is building up generations, it was designed to only use the most recent one, and the old ones should be freed. So … | |
I am new to Turbo C can anyone tell me how to create a project of muLtiple .c and .h files in Turbo C, and also how do you combine all the files at once? | |
Hello I know I may receive some grief for not inserting code correctly it is my first post... My question is this: I am reading a huge list of values from a file and I need to store these elevations into an array so they can be used to calculate … | |
[code] #include <stdio.h> #include <string.h> #include <conio.h> #define MAX 17 #define TAX_RATE 0.12 #define LENGTH 30 struct menuItemType { char menuItem[LENGTH]; float menuPrice; int numOrdered; }theMenu[MAX]; void Menu(void); int getData(int); void overView(void); void initialize(void); int order(void); float pbill=0; float bill=0; float totalTax=0; int main(void) { int choice=0; char end; initialize(); … | |
This program needs to create, sort, and search a novel array. Each novel in the collection will have the following attributes: Title Author Publishing Year Number of Pages The novels I will be sorting are in a file called data.txt I need to use bubble sort to sort the array … | |
Hi everyone, It seems my struggles with structures have continued. In my current program, I'm trying to pass an array of structures into a function. I've declared my structure in a separate header file using [B]typedef [/B]to define a new type called 'flight'. But when I try to compile my … | |
[CODE]#include<stdio.h> int function() { int test1; int test2; addit(test1 + test2); return(0); } void addit(test1 + test2) { printf("Sum is: %d",test1 + test2); }[/CODE] Whenever I define a void function in C with an operator in the parameters, I always get the error: error: expected ')' before '+' token How … | |
i half understand this code, just wondering if anybody could give me helpful tips/hints about understanding the difference between these two functions [code=C] extern status traverse( list L, status ( *p_func_f )() ){ if( empty_list ( L ) ) return ( OK ) ; if( ( *p_func_f ) ( DATA( … | |
Dear All please read below my test C code. The ins_inv() picks Value of :cds but did not pick :xyz value though it is populated in find_sp_inv() function. [code] varchar cds 11; varchar xyz 30; varchar fxo 11 main(argc, argv) int argc; char **argv; { find_sp_inv (); ins_inv(); } find_sp_inv() … | |
I was wondering if the following fuction is a safe way to get input from a user (with a specified length). [CODE=c]char *input(int inputSize) { char str[inputSize + 2]; /*DO STUFF HERE (i.e. GET INPUT, CHECK IF CODE IS CORRECT, ETC*/ return &str[0]; }[/CODE] Is there anything that can go … | |
Hey In VS, you can in a struct do: [code] struct test{ int tes; }tt; [/code] then when I put tt., it would display the all fields in a tooltip which in this case would display tes. Is "IntelliSense" (I know it is not called that) in wxDev-C++? | |
Hi, I am comfortable in c.But i find errors here in my code.I know its related to that structures cant be accessed outside main().Need s use of pointer.How to do?.Help me soon. A revised code will be of help. [code=c] #include <stdio.h> #include <string.h> struct phonebook { char name[100]; long … | |
I had forgotten about calloc for the longest time, but I was recently reminded of it. Now i'm curious, what would be the difference between [ICODE]malloc(numElems * elemSize);[/ICODE] and [ICODE]calloc(numElems, elemSize);[/ICODE]? If my knowledge of arrays is correct, there shouldn't be any difference in the memory allocated. | |
This program needs to create, sort, and search a novel array. Each novel in the collection will have the following attributes: Title Author Publishing Year Number of Pages The novels I will be sorting are in a file called data.txt I need to use bubble sort to sort the array … | |
Heya, Just trying to get a little help on some excercises I need to do, Done 14/15 fine, but stuck on 15th and not sure quite whats wrong. Need to do a systemcall from C program to copy a file, using stat, open, read write and close. So far I've … | |
Hi all, I want to find the size of proc file using C....can somebody help!!!! | |
hi guys i've problem in tcp:client/server program when i run it: this program is to print the contents of a file in other m/c connected to LAN im sure that i've given the correct IPAdress,and also path of the file in other m/c but still its not printing the contents … | |
Hi friends i am doing the snake game program for Set top Box . I am Facing problem when i get the remote control keys. if i press the up,down,right,left keys when program is running ,program does not response .once game is over then it is taking the values from … | |
i can't make this programs..some body,,please help me.. | |
Hi everybody, Im a new member on this forum and I want ur help on C language. Im a new student on this language & mostly we study it by our-selves. This is the question: > One of the academic staff is trying to keep track of the students and … | |
hi all, im having some problem , returning the buffer array to the main function, im new at this , i need to print the currentdate from the main function, is thr any way i can return the date to the main function ?? [code] #include <sys/time.h> #include <time.h> #include … | |
Newbie to C programming here. I am trying to convert a char array into individual hex values and store them in an unsigned char array. Basically I have "3www6google3com0" and I would like to get the 8 bit hex value for each individual character from the string. I would like … | |
I want to write a program that can run a file in my hard disk.For example,a test.bmp file is there in location D:\home\test.bmp,that program should open(like double clicking on it ) that file (test.bmp) and i can view the image contained in the file. | |
Ok so I have to turn in this C program today that is able to selectively sort a list of names from an input file, but when I compile it and run it, it doesn’t sort it correctly. Can anyone please help me here? I’m losing my mind to my … |
The End.