15,552 Topics
| |
i have made the following code... but i am having problems in accessing it.. [code] //structure for queue struct queue{ int items[MAX]; int front; int rear; }; //decleration of the queues :que_term for the values printed on the terminal struct queue que_mul2,que_mul3,que_mul5,que_sort,que_write,que_term; //initializing the queue void InitQueue(queue &q) { q.front=0; … | |
Hello people, Whats the use of switch(ch) in c? | |
hello everyone.. I have been given an assignment to do a mini project in my college using C.As such im in dire need of ideas for the same. I need ideas for programming games,innovative programs etc.. till date they have taught us C pointers structures & arrays.. So ill have … | |
Can you give an example of how I could implement a C functional #define statement in C#? I have one with 3 lines of code, delimited using \ at the end of each line.... could you explain how this works when executed in C? Thanks | |
Hi, I am basically writing a program that reads in ASCII files exported from 3ds max in order to reproduce an object in OpenGL. My code works fine for one object and I've even got it working for two as long as the second object contains less vertices/facet windings than … | |
Hi all, I'm working on a programming assignment for class and after trying a few things on my own I got stuck. Basically my function will take a string and count the number of times each word in the string occurs in the string. For example this string: The brown … | |
i need something from standard libraries that can help me outputting chars at specific places on my screen...i have seen some commands defined in conio.h but i cannot use it as my compiler doesnt have it and it is not standard and not portable any other libraries or suggestions? | |
Can anyone suggest a book from which I can learn Window based C programming ? | |
I HAVE A VERY PECULIAR PROBLEM,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, THE PROGRAMS I COMPILE SHUT DOWN AFTER COMPILING ONCE,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, FOR EG- I CREATED THIS PROGRAM FOR GETTING THE ASCII CODES OF AN ALPHABET ,,,,,,,,,,,,,,,,,, AFTER I WROTE THE ALPHABET IN DOS IT DISPLAYED ITS VALUE AND SHUTDOWN,,,,,,,,,,,,,,,, HOW CAN I ALTER MY PROGRAM TO … | |
Multiplying the digits of an integer and continuing the process gives the surprising result that the sequence of products always arrives at a single digit number. For example, 715 ---- 35 ---- 15 ---- 5 27 ---- 14 ---- 4 4000 ---- 0 9 The number of times products need … | |
Hello. My program gets "segmentation fault" in "strcat(string,stringaux)" and it is strange because I am sure that string always has space for adding the new stringaux due to before call strcat I check if size of the destiny plus new stringaux is less than string capacity: [code=c] char string[100]; char … | |
Hi all, Just registered on the forum. I have a quick (hopefully) question. I'm trying to read from a text file into one single string. I'm having some trouble though and can't quite find my error. I have the following code below right now. The problem is that my function … | |
is there a way to increase bluetooth range in mobile phone for 1 seconed? by changing the driver or somthing like that? in C\asm? i asked in the java forum,they said it might be possible in C. to save time - i checked and it's possible to increase range of … | |
How to do this assigment.im did not understand it..plz somebody help me.i will appriciate anybody who will help me. The program question are like this and this program should use c programming:- The owner of a snack bar wants a system which will allow a menu, with prices, to be … | |
hi everyone. my program uses an infinite loop & runs forever. i want to run some codes when i decide to stop the program using CTRL-C. Is this possible ? Please advise me. thanks | |
Project Title : Student Grading System Purpose : Calculate the grade and sort the student matrix in descending example Input file : studentsmark.txt example Output file: studentresult.txt How the user operate the software: 1) user run the software 2) an interface show on the screen 3) user keyin Input file … | |
I'm trying to solve [URL="http://code.google.com/codejam/contest/dashboard?c=agdjb2RlamFtcg4LEghjb250ZXN0cxh5DA"]this[/URL] problem. The input file I used was the one on the site: [CODE]4 9 0123456789 oF8 Foo oF8 0123456789 13 0123456789abcdef 01 CODE O!CDE? A?JM!.[/CODE] My abstract idea was: Read the first line, loop the program that many times. Read the next line. Load the … | |
Need to write a simple declaration program w/c apply the substitution method. substitution table is: *-a $-e /-i +-o --u sample outputs ENCRYPTED MESSAGE: m$$t m$ *t 9:00*m /n th$ p*rk DECRYPTED MESSAGE should be: meet me at 9:00am in the park MY PROGRAM: [code=c] #include<stdio.h> main() { char c; … | |
Hey guys this is a very naive problem,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, but how do i save the c programs i compiled on borland c++ on the dekstop??????????????????????? | |
I can't understand why when I'm calculating the num of elements of 'A' in main(), so the result is correct. But when I pass the 'A' to function myfunc() and calaculating there so the result is incorrect. Can please someone explain me? [code=C] typedef struct { char description[30]; unsigned price; … | |
Hey Guys, I need some help figuring something out for an assignment. The assignment is basically about creating a editing program to edit a single char string on the console, everything has been coded and works without a hitch except for one part. I can only display a certain number … | |
three stand A,B,and C as a capacity of 20 each array should show 0 or seats occupied method should show capacity and state of each stand before accepting user input accept age,stand,and index as input output total amount collect by each stand,total classification of the patrans in each stands when … | |
I have a structure [code=c] struct Info { char *name; char **value; }; [/code] and a function [code=c] void addValue(struct Info *info,char *value ,int posVal) { int size=strlen(value)+1; info->value[posVal]= (char *)malloc(size); strcpy(info->value[posVal],value); info->value[posVal+1]=NULL; } Main struct Info info[10] ....... ....... initValArrSize(&info[0],1); /* Make size+1 single dimension arrays of size char … | |
Write a program that will compute and print out all positive integers that are less than and relatively prime to the integer 351. Two numbers are relatively prime if their greatest common divisor is 1. You must call a gcd function. so far i have this, it compiles and works … | |
Hi, I am trying to develop a DOS-like system which will be able to do all minor functions like cd.. cd/ and changing to sub directories. Guys I am stuck in how to find a single path for many files..... Thanx in ADVANCE | |
I want to able to search for multiple words on the same line. For example, consider the file with the following contents: .... 11. 15 18 40 53 => 16 19 41 54 12. 03 15 27 64 => 04 15 28 65 13. 25 46 47 91 => 26 … | |
Hi there. I've written a program to sort a few numbers. However, I get an error missing function header. Can you please guide me where did it go wrong? Thanks [CODE]// #include "stdio.h" int sort(double top, double middle, double bottom); int main() { double x[20]; x[1]=0; x[2]=-0.07; x[3]=0.08; x[4]=-0.01; printf("%.1d,%.1d",x[1],x[2]); … | |
i define a structure that contains a constant member. the problem is, when i use [icode]malloc[/icode] to make such a struct, i fail to initialize its const member, for example: [code] struct C { int* const p; }; int main() { int i = 0; struct C s = { … | |
Is there any way to force fwrite() to write in big-endian format no matter what? I am trying to write a MIDI file and they are always big-endian. Converting every value I write to big endian beforehand would be extremely tedious. Ideas? | |
[code]int **p; p = malloc (x * sizeof *p);[/code] sizeof *p - (i am not quite sure, and i was thinking) does it calculate the size of *p as size of double pointer, size of pointer or as size of variable pointed by pointer another exmaple with same [icode]int **p;[/icode] … |
The End.