15,551 Topics
| |
Hello all, I have an assignment that seems to be fairly popular. I've done some searches to see if I could resolve my issue but haven't stumbled across the exact problem I'm having. This is the assignment: [QUOTE]A parking garage charges a $2.00 minimum fee to park for up to … | |
Hi, Here I have my code which exactly functions as nl command in unix. How can I replace my buffer using malloc which reads unlimited line length and where as my code reads 100 char per line. [code] #include <stdlib.h> #include <stdio.h> #include <string.h> #include <errno.h> #define MAX_LINE_LENGTH 100 //Prototypes: … | |
Hello, [CODE] #include <stdio.h> int main(void) { const int j = 2; int i; switch (i) { case 1:break; case j:break; default:break; } return 0; }[/CODE] i tried executing the above code, and i got the following error: [B]error: case label does not reduce to an integer constant[/B] Well, since … | |
Hey Friends i am new here !! Well i have a project in which i am required to make some good program out of the Tubo C book !! Now i was thinking of a Tic Tac Game or a Mathematical equation calculation program ! I`ve seen some examples here … | |
My Object is to display a 24bit color .bmp picture in 24 bit colors via Turbo C Compiler. Turbo C can display only 16 colors so I will need to use a Windows Interrupt[or something like that] to display the image. I googled a lot but couldn't get a hint … | |
i have managed to write a program that reads an arbitrary number of integers less than or equal to 20 and finds the sum and average. i am now trying to write a bubble sort to order the integers from least to greatest but i am having problems. this is … | |
| Hi guys, So my code is below. This is a simplified version of the shell... It does not continue for ever... I guess its actually rather a program to accept a command.. has the fork and the execve etc. Anyways when i compile it and run it in the terminal … |
I have the equation 6a+9b+20c=n with n being the total number of McNuggets, and the "a" "b" "c" being the pack combos of McNuggets. Now, for n, there are different combinations that can be used to get n where n >= 6. [B][U]The problem asks that I should be able … | |
I go to Rutgers, NB, and I'm taking a class that requires the use of C without teaching us much of C, so sorry if I'm a bit uneducated. My first question is, when using fgets(), how do I get the [B]next[/B] line? I have [CODE]while((fgets(line,MAX,file)) != NULL){[/CODE] to get … | |
the basic idea of what im trying to do is write a program that reads an arbitrary number of integers less than 20. then it prints out the position of the integer in the order the user inputed it then it finds the sum when it scans a non integer … | |
Hi, I'm working on a project where I have a text file that needs to be parsed into assembler instructions. For example: 01364820,8D280000,FFFFFFFF will be parsed as: ADD $t1, $t1, $s6 LW $t0, 0($t1) I need help parsing the text file. I thought I would start by first reading the … | |
I have to use a software package written in c with many different files. It has an executable file with a variable - cc=/usr/bin/gcc cc is later used in that file to compile other files present in the software. wenever i try to run this file I get an error … | |
Hi! Im a newbie here.... I got a problem with my program...My linked list is ok but everytime I export the data to the file, things don't work in a proper way..I will show my code...pls help me...thanks... [code] labname[20]="lab445.txt"; /****************FWRITE FUNCTION**********************/ void save_data(information *lab,char labname[]) { FILE *fp; int … | |
I think I have a hard time understanding the return() statement. I have to make a program where a user gives the lower limit and upper limit as input. After that, the program should give all prime numbers that are between those 2 numbers. A testcase would be: input: 10 … | |
Hi! i am trying to compile/link a simple application that uses a library called OpenDBX. I have already compiled and installed that library. Now, i am trying to do a simple client of it. The client (Prueba.c) is just like this: [CODE] #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <odbx.h> … | |
Example, n is 8. Merge sort (for link list) is constantly divide the list into two sublist until every node->next will point to null. Then, sort them by merging them. When I tried to count it myself, in the divide part first divide the 8 nodes into two. In link … | |
Hi everyone![I] I need to write program that will find the average of 20 element array and also display the number of each number in the array occurs.[/I] [I]I have sorted average number but straggle with "number of occurrences". Please help!!!![/I] [code=c] #include<stdio.h> #include<math.h> main() { float avg,sum=0; int i,j; … | |
I am taking an algorithm class and haven't coded in c in around 5 years and realized I have forgotten alot. I tried to use atoi, i know there is a better function but for what I'm using it for and my lack of knowledge now it is simpler, for … | |
that an error in my .h , and i need a hint,which would be the problem? | |
hi! I'm looking for things which compile on visual-studio, but not in the gcc compiler in the C programming language (C++ it's ok too). I have to make list of such things. If someone could send me link to such list or send me some examples, it will be great! … | |
hiii guys.. i am trying to make an mp3 player using ADSP 21369 processor. For that i need a code which can convert mp3(mpeg2 layer3) samples to wave samples in c. thanx in advance. | |
#include <my_global.h> #include <mysql.h> int main(int argc, char **argv) { printf("MySQL client version: %s\n", mysql_get_client_info()); } I got the error when i try to compile the above code. | |
Hello, I have a txt file of the following format: 315151,34.56,1,1,54442221,23344445 512512,12.54,1,1,23444442,45612345 I am using the following code to parse it and it works: while( fgets( output,sizeof(output) ,file) != NULL ){ i=0; token[i] = strtok(output,","); while( token[i] != NULL){ i++; token[i] = strtok (NULL, ","); } dec2bin(atol(token[4]),binaryBefore); dec2bin(atol(token[5]),binaryAfter); dec2bin is … | |
hi everyone! i've been trying to make a program regarding returning the number of characters with even ASCII codes. For example, if a user input ABCDE, the output should be 2 since B and D are of even ASCII codes. Here's what i've done so far... [CODE] #include<stdio.h> #include<conio.h> #include<stdlib.h> … | |
I have a txt file in this format: 111,5.67,2,4,566666,666667 111,5.67,2,4,566666,666667 111,5.67,2,4,566666,666667 111,5.67,2,4,566666,666667 Is there any way so i can open the file and at the end of each line binarynumber to become: 111,5.67,2,4,566666,666667,111000,111000 111,5.67,2,4,566666,666667,111000,111000 111,5.67,2,4,566666,666667,111000,111000 111,5.67,2,4,566666,666667,111000,111000 | |
wat is the concept beyond COLUMN SORT??.. can any body guide me...Y column sort is introduced?? | |
Dear friends.. i have been assigned the project of designing source code for Booth's multiplication algorithm in C. We have reached 60% of success but are now stuck.. if anyone has the source code in C or may be in C++ or even in microprocessor 8086 pls send it here … | |
This is the code I have so far. I can't even get the numbers range to print to the screen correctly. I am very new to all this stuff so go eacy on me. Can anyone help?? [code=c] #include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> int main() { unsigned … | |
I am currently writing a simple program that will either allow me to add music or show all of my albums, artists, and songs. The program starts in main(); then after selecting "View Music" it goes to the viewMusic() function but runs through the function and skips the getchar() for … | |
#include<stdio.h> #include<conio.h> main() { int num, dep, with, bal; clrscr(); num=1; printf("MENU"); printf("\n\n1. Deposit\n2. Withdraw\n3. Check Balance"); printf("\n\nEnter a number of choice: "); scanf("%d", &num); switch(num) { case 1: printf("\n\n\nEnter an amount to be deposited: "); scanf("%d", &dep); { printf("You have successfully deposited an amount of %d.", dep); } getch(); … |
The End.