15,552 Topics
| |
hi there.....i wonder what's the difference with these 2 linked list... [code] 1. struct node { int wage; int hours_worked; int salary; int hoursW; char* name; struct node *link; }; [/code] [code] 2. struct listNode { char data; struct listNode *nextPtr; }; typedef struct listNode ListNode; /* synonym for struct … | |
How does gcc order bitfields on a little-endian machine? Is the first entry the most significant bit or what? | |
i've done all the coding, but it doesn't work, seem the if, cannot pass the information to the function.. [CODE]#include<stdio.h> #include <string.h> #include<ctype.h> #define FILENAME "ECE.txt" /*void proceed(struct registration com, int matric); void again(struct registration com,int);*/ struct registration { char code[10]; char subject[100]; int credit; }; int main() { int … | |
Write functions to: void clearscreen(void); /* Clears the screen for update, hint call system("clear") */ float calc(float num1,float num2,char operator); /* calculate the result of num1 operator num2 */ any other functions which you deem necessary. Write a main program which will display a title line centered at the top … | |
Is it possible to add two hexadecimal numbers in C? If so, i would request someone to help wit the method or the logic asap. thank you :) | |
Hello again :) This time I'm back with a stranger question. The following program is meant to factorialize (spelling?) a number from the command line while printing out the number of calls it made to the function "factorial". [CODE=C] #include <stdio.h> #include <stdlib.h> unsigned long long factorial(int num,int *count_ptr){ printf("Call … | |
/* this program compiles is almost done, but i cannot get the las function to sort numbers from the array. the output should have the even number on the left and odd numbers on the right.*/ [code=c]#include <stdio.h> #include <stdlib.h> #define N 9 void revArray(int *a); /* reverse an array … | |
I just want to ask if is smart or even possible to use a switch case statement in a program where the user will not be required to input anything, but instead the program gets the input from a *.txt file. This is a suggestion by my friend, I just … | |
okay, so i'm totally new to this. the purpose of my assignment is to compare two strings and to see if they're anagrams my problem is that when i run it, it compiles okay, but then i'd get a message from windows, saying that it has stopped working. er, yeah. … | |
The question says Write a menu driven program that finds the minimum, maximum and sum of 3 numbers (integers). All the numbers entered should be unique. (i.e. no two numbers should be same .Check this condition) Please adhere to the following guidelines. a. Write a function that finds the smallest … | |
Hi, I am using Borland C Compiler for preprocessing a source file. I am using the following command for preprocessing.... C:\cpp32.exe -P- -o"outputfilename" "Sourcefilename" According to my requirement i should get source file comments into preprocessed file. The above command is not satisfying my requirement. I don't which options i … | |
I'm trying to make a program that will ask the user to which file they want to sort, sort it, then output the sorted text into a user specified file. the text file will contain names and the program should make lowercase and uppercase letter the same. [CODE] #include<stdio.h> #include<stdlib.h> … | |
Hi, I need to write a program that reads from an input file (input_equations.txt) the values of the numbers that will be inputed into a function to find the quadratic root of the 3 numbers. For example, the input file could contain: 1 0 1 1 3 -4 2 -4 … | |
can someone help me how to make this one: write a program using two-dimensional arrays that computes the sum of data in row and sum of data in column of the 3X3 array variable n[3][3]. sample output: 5 9 8 = 22 3 8 2 = 13 4 3 9 … | |
hi everyone :), i wanted to create a little program with makes the divisions of the elements of a table i wanted to create a loop which will indicate if there's a number in the table then we should c "the division cannot be made", if not we will get … | |
Hey guys below a program that I have as my homework.I am not askign for the code, but on how the calculatio is being done.I am asking about the mathematics part.I dont understand how it is being caluclated. someone told me i need this formulas. P = (rho * g … | |
I just want to program a proxy server for one of my academic purposes.I would be very thankful if any one can let me know a place where a simple proxy server code written in c language or some resources about proxy architecture. Thanks | |
Hey everyone, my group and I have this finals project that we'll have to defend. It involves ASCII characters for the table. We've managed to fix the table and everything but no matter what we do, our program won't compute. Here's the program: [code=c]#include <stdio.h> #include <stdlib.h> #include <string.h> #include … | |
| |
C:\John\mines.cpp(5) :fatal error C1083: Cannot open include file: 'graphics.h': No such file or directory from this code [code=c] #include<conio.h> #include<stdio.h> #include <graphics.h> #include<stdlib.h> #include<dos.h> #include<time.h> #include "events.h" #define YES -1 #define NO 0 #define MARK 1 #define DOUBT 2 int boxleft=225,minemarked=0,explode = NO,totalmine = 25; void minegenerate(int num,int x, int … | |
Hey, I just started to learn how to program in Windows and have a problem with the very first program. It's from a C Book I have, so i guess the code is alright. Error: undefined reference to `_Z7WndProcP6HWND__jjl@16' I'm using the Eclipse C/C++ IDE; libraries (gdi32.lib) are linked, -mwindows … | |
My buddy runs this program fine in his C++ editor but when I run it in Cygwin after I enter 3 temperatures I get this: [B][U] 7 [main] a 26966 _cygtls::handle_exceptions : Error while dumping state (probably corrupted stack) Segmentation fault (core dumped)[/U][/B] Everything seems to be syntactically correct from … | |
Hi, i found this Function to convert any integer into its BINARY VALUE... I could not make it through.. Can someone Help me out.... I need a good explanation on how it works... Here is the code. [code=c] char *binString(int value) { static char bin[17]; int index; for(index=0;index<16;index++) { if(value … | |
Another problem has occoured. How can I get the highlighted function to run? Whenever I run the program, the function is totally skipped. [code] void add() { int vala, valb, valc, bog=5, count; char alakazam; double log[0], vald, valf; clearer(); do { for(count = 0; count < 5; count++) { … | |
Hi all, Can anybody help me with a an algorithm to find the maximum subset sum in an array. It would be better if the solution is of O(n). [example: {5,-2,10,-4} the maximum is 5 + (-2) + 10 => 13]. | |
I have undergone a basic course in C Programming and I wish to enrich my programming skills by learning how to code for graphics in C and my main interest is to learn to write virus and so on. Could you please guide me what books should I need to … | |
hey guys I have a question on this guessing game. I want to make this game to repeat. when the guess is correct, i wanted the user to input 'y' or 'n' and if yes it should repeat. How can i do that? Do I have to put the whole … | |
i dont know how to display the contents in my program.pls help me with this...i use 2 linked list here...1 for the bills and one for the names....i cant display the names of the employees.......if i dont pass this on friday,i will fail =(........pls check my code and encode ur … | |
My online class just started into arrays, and I am getting this nasty error "passing arg 1 of `show_costs' makes pointer with integer without cast". I have no idea what the problem is. If anyone would be so kinda, please help. BTW: sorry, I have a habit of naming my … | |
I have been given a problem in which i have to write a program to find the letter frequency and the average word length of a piece of text. i've written the code to promt for and read in the text file. i'm finding it difficult however to make the … |
The End.