15,551 Topics
| |
i have problem passing double pointer to my funciton first i declare: [icode]int m, n;[/icode] i read m and n from user just fine (i've checked that) then i declere: [icode]int farm[m][n];[/icode] and i have a function... [icode]void harvest(int **farm,...);[/icode] and when i call it with: [icode]harvest (farm,...);[/icode] it says … | |
I am trying to create a project, which will compute the yearly and monthly rate of taxes to be paid by a person earning a given gross yearly salary, knowing the rates for NI contributions, pension contributions, and income tax. The problem i am having is i dont think the … | |
Hi All, i'm executing a C program in unix, is there a way i would be able to capture abnormal termination of the C program. i observed that abnormal termintion results in the segmentation fault message being displayed. Would i be able to capture the return count in Unix to … | |
| |
I have this assignment to write my own malloc program and I am having some trouble. I am using a doubly linked list to manage free space and used space, and using next fit to allocate the memory. the problem that i am writing about is when i return the … | |
I tried a code like this [CODE] #include <stdio.h> int main() { enum a { b, c, d, e,}f; printf("The stack top is near %p\n", &(f = e) ); return f; }[/CODE] and got message : error: lvalue required as unary ‘&’ operand I use gcc4.3.2. and I had tried … | |
// author :: DEEPAK PS // AMRITA UNIVERSITY,AMRITAPURI //BSC CS [code=c] #include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> int main(void) { /* request auto detection */ int gdriver = DETECT, gmode, errorcode; int left, top, right, bottom,i; // char s[20]="Done By DEEPAK.."; /* initialize graphics and local variables */ … | |
Hi i am new I have two c prgorams as yuva.c & raj.c For this how i create make file please help me Thanks Yuvaraj R | |
whether there is c program implimentation forthe stable marriage problem? How can I extend this problem in a real life situation? | |
I just wrote a simple function to convert a number with any base into a base 10 number: [CODE=c]#include <stdio.h> #include <math.h> #include <string.h> int tobase10(int *input, int size, int base); int main() { int input[256] = {2, 2, 1, 0}; printf("%d\n", tobase10(input, 4, 3)); printf("Press any key to continue … | |
[Newbie here] 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: [#include<stdio.h> main() { char … | |
i am able to read the nice.ls FILE. Let me explain u my nice.ls FILE content 1st column is integers dont bother abt them, 2nd column is address, i read it by using isxdigit array[6] and i am able to read the hexadecimal 3rd column is opcode , i am … | |
what is the output for program below [code=c] int a = 5; int A = 8; A = 9; a = 7; printf ("%d%d", aA); [/code] | |
Hello, C program for audio compression and decompression? Please help .. I need the source code... Thanku | |
Hi check my program i have used to read a FILE( nice.ls is shown below the program). I am able to read the FILE nice.ls, but i also have to check whether it starts with interger and next i have to check the hexadecimal if no hexadecimal then it should … | |
Hi, I'm getting a warning when compiling the following code: [CODE]void printstr(unsigned char *string, volatile unsigned char *videoram) // Print a string { int i = 0; while(string[i] != '\0') { videoram[2*i] = string[i]; videoram[1+(2*i)] = 0x07; i++; } } unsigned char *memset(unsigned char *dest, unsigned char val, int count) … | |
Hi guys, I'm from India, I'm doing my first year IT. We have been asked to submit a mini project, so i was trying to develop a keylogger using c, but my keylogger senses keys only within the editor and the output screen, is it possible to do that using … | |
Sorry if this is in the wrong section but I wasn't really sure where else. I'm trying to use gcc and -S option in order to produce assembly file. Now, if I do not use -S, I can compile it fine and run it. But once I do use -S, … | |
Hi guys , i am new to C and i am looking for help basically ,i have this subjeCode[][9]={"UMA 1162","UMB 1052","BSM 1913","BDA 1602","BEE 1113","BEE 1122","UMB 1011","\0"}; and i want the user to enter the code then the program checks whether or not it is there!! so Please can any one … | |
Here's the deal. I have two arrays. One defining a character set(could be any length), and another defining a string. I want to switch every letter in the string with its placement on the character set. For example: chrset[256] = "abcdefg" string[256] = "gfdc" will turn into: chrset[256] = "abcdefg" … | |
Just getting back into c (I've been dosing assembly for the last few months), so don't laugh at me :S I'm trying to read an input file. The fist line contains how many lines to read. The rest of the lines contain 3 words. Here's an example: [CODE]3 Hello, World … | |
i have to make one prg in c that accept only odd number (no) which is (4>no>30) & have to genrate the pertern which is given below when no=7 then given petern should be genrated for that i have do some coding but i can't get the exatly petern.. pls … | |
hello everyone,I must solve a problem which effect my c programming lesson grade...Here is the problem: Write a program to convert a time given seconds to hours,minutes and seconds format. Sample Run: Enter seconds: 8230 It is 2 hours, 17 minutes ,10 seconds… We learned only #include<stdio.h> not iostream or … | |
Hello! I am trying to write a program that test whether a word is present in a file or not using command line argument. Here is my program. It does not work properly. Although the word I entered is present in the file, it has been saying that " the … | |
Hello I am writing a file program like that user has to input a string and that string was written to a file. From that file, that string was read to the another file changing lower case letters to upper case letters and upper case letters to lower case letters. … | |
Hi there, My friend has got vista in his laptop , now when he tries to run a Graphics program in TurboC it doesnt show the output ( there's no coding problem, BGI header files all are ok) So i gave him Turboc 4.5 , now this TC hasnt got … | |
I was making a dos based text game and needed user input. I looked through the forums and found the thread on safe user input, which would be using fgets() instead of gets(). The first problem I ran into was that stdin always had '\n' in the buffer, so it … | |
I had some code that worked fine, but then I decided to put it in a header file and now its not working. This is my first time using my own header files so I'm assuming I made a beginner mistake somewhere... [CODE]/* kernel.c */ #define SCRWIDTH 200 #define SCRHEIGHT … | |
hi guys im new to the site im from south africa...im currently in my second year of electrical engineering and now my college has forced me to do software design and ive never had any experience with programing and the others have cause they had programming 1...so my problem now … | |
What way(s) can I reread the same file in C? I've only been able to find C++ tutorials. I tried: [code] fclose(infile); infile = fopen(argv[1], "r"); //error checking [/code] but this code didn't go to the beginning of the file. |
The End.