15,552 Topics
| |
Hey everybody, Once again, I find myself humbled and confused. You see, I have a text adventure engine (although at this point its just a map traversal... doesn't end yet :P) and I'm having a few issues with the commands. I can move around the map just fine and I … | |
hi all, I am new to this site and hoping to get a solution to my problem.I am using ethereal to capture the packets in the network and the file is saved as .cap file.now using c prog i should filter out only dns packet in that file.can any one … | |
hello i would like someone to help me to create a code in C for prompting a user to name a text file and then open it please help me ASAP thank you. | |
hi, i can't seem to a.out the program for some reason. When i type in a.out, the cursor just stays there. I think it goes in a infinite loop. I am trying to read two text files and then putting the atomic number in order. what seems to be the … | |
I'm trying to go through an array of char where all the chars are numbers, convert them to int, add them together, and save them as char again. For example, char string1[10] ={'0','0','0','9','3','1','4','0','9','1'}; char string2[10] ={'0','0','0','4','1','7','4','2','6','5'}; should produce an end result of char string3[10] = {'0','0','1','3','4','8','8','3','5','6'}; However, it won't convert … | |
hi there, i try to map a file in memory, in linux, using mmap, so that what i write in memory will be written in the file as well. the piece of code looks like this [code=c] fd = open(argv[1], O_RDWR); if (fd == -1) { error_message(__FILE__, __LINE__, "'open' failed … | |
Ive been working on this program for a little while now. and i keep getting the error messages: proj6b.c:61: error: syntax error before '{' token proj6b.c:68: error: syntax error before '{' token ive looked over the code and cant seem to find were the problem is. I am also a … | |
Hi Can any one help me what is the order of evaluation for the expressions in printf() function in C language..... I have sooo much confusion in the expression like a=10; printf("%d",a++ - a++); the output is -1 any one can help me how -1 is the output...... But when … | |
[code=c] #include<stdio.h> #include<stdlib.h> struct sales { int week; char name[20]; int units; int price; }; int main () { char data1[300]; int itemAmount = 0; char itemNumber[10]; int timeToFinish = 0; int elapsedMinutes = 0; int iLoop = 0; int readCounter = 0; int finishTime[20];//holds the finish items int counter … | |
Create a modular program in C that generates and modifies a number of circular double linked lists. Each node in the circular double linked list should have two pointers which should “point” to the next and the previous node. And that the double linked list is in the form of … | |
typedef struct node node struct { int when i run the C program, compiler give me an error which is , is expected, help me | |
i want to define a function that calculates the " integral" of a function | |
i am new at programming basic.. i got this problem at school... i want to seek help from you!..its all about inserting and deleting arrays in c language!.. im really confused about the code of this...pls help me!... for example: given this output: Menu Operations: [1]Insert at beginning [2]Insert at … | |
Hello i got this project that i have to do and im very bad C# and need help ASAP i have done a little bit but not much i will display the coursework outline and after that the code that i have done so far, i would appreciate it if … | |
i am writing a program for seats reservation... here is the thing.... we have only one airplane with 10 seats... type (1) for expensive seat type (2) for cheap seat type (0) for exit you have to use seats[10] array and you have to do seats[10]={0}; if you type (1) … | |
i dont know how to pass variable values from a function to another.. i get this error passing arg 1of 'add' makes integer from pointer without a cast here is my complete code: (this is not complete as i am just starting a text-only calculator :P) [code] #include <stdio.h> void … | |
Hey everyone, I'm attempting to write a header file, example.h that will contain function declarations that will be defined in example.c. For some reason Its giving me an error when i do this [CODE]extern void mainMenu(node*);[/CODE] Now node is a struct defined in another header file, should I include that … | |
Hi Recently I started programming C (not C++) in borland 4.5 at school. Now my teammate and I have to make a small game. Therefor I will use an two-dimensional array, the field (a table, rows and colmnes). This two-dimensional array holds chars ("X", "|", "J", "-" and " "). … | |
[code=c] #include <stdio.h> #include <math.h> char decesion_matrix(double hh) { if(hh < 5) { printf("statement 1\n"); } else { printf("statement 2\n"); } return 0; } int chara_sum (int ii, char string[ii]) { int loop; char a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z; double hh; hh = 0; for(loop=0;loop<ii; loop++) { if(string[loop] == a) { string[loop] = 1; … | |
I would like to request the basic tutorial in c programming pls help me because im still the beginner | |
Hi, i am given an array of atomic numbers, and I need to arrange them in order from 1-100 or something. the program i wrote is this [code] for(fill = 0; fill < (m-1); ++fill) { if(atomic_num[index_of_min] <= atomic_num[fill]) { temp = atomic_num[index_of_min]; atomic_num[index_of_min] = atomic_num[fill]; atomic_num[fill] = temp; } … | |
Hi, I have a linked list which I created in a function? I want to allow the user to enter a name for the linked list, and then after he/she can display the list by typing in the title. This is part of my code [code]struct llistt{ char str[100]; // … | |
Basically for part of my assignment, I have to write my own int to string. This is done, however the problem is I can only enter 6 digits to convert otherewise my program crashes. Out lecturer also wants us to use the abs function as the value passed in can … | |
please help me with this problem: i have to linked list, i need to compare them, and do something with regards to there result.. | |
I must to write i program in C which will carry into clause(sentence) from keyboard and count how much "," have how much spaces " " have and how much times occur the word "The" for every clause(sentence). And in the end program when you carry into clause(sentence) must print … | |
i have this project to do for class. i get how the program works.here is the project: Use a single subscript array and functions to solve the following problem. A company pays its salespeople on a commission basis. The salesperson receives $200 per week plus 9 percent of his/her gross … | |
hi all, i want to execute a function by a separate thread and get that functions return value in to the main thread. one way to do this is set a global variable by that separate thread and access that variable from the main thread. This procedure is as follow. … | |
Hi, i merged two files into chem.out but i need to figure out how I would arrange them by atomic number and how i can eliminate the duplicates. Should I use structures? here is the program i wrote so far, [code=c] #include<stdio.h> #include<math.h> #include<string.h> void merge_chem(FILE * inp1, FILE* inp2, … | |
[code=c] #include<stdio.h> #include<string.h> /*#include<stack.h>*/ #define MAX 10000 #define TRUE 1 /*typedef struct node node struct node { int */ [COLOR="red"]int graph[MAX][MAX]; /* = { { 0, 1 },/* 0 1 0 */ /*{ 1, 1 }};2 0 0; */[/COLOR]int nodes; int fnodes; int counter2 = 0; int counter = 0;//Start … | |
Hi, I copied one file into another but couldn't figure out how I would number the lines and put a heading on chem.lis, which is the output. here is the program i wrote so far [code=c] #include<stdio.h> #include<stdlib.h> #include<string.h> int main(int argc, char *argv[]) { FILE *inp, *outp; char ch; … |
The End.