15,550 Topics

Member Avatar for
Member Avatar for ashok1424

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.

Member Avatar for Nick Evan
0
102
Member Avatar for chaosatom333

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 …

Member Avatar for Nick Evan
0
112
Member Avatar for Marauder_Pilot

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 …

Member Avatar for Ancient Dragon
0
116
Member Avatar for doublex

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 …

Member Avatar for doublex
0
120
Member Avatar for controlsi

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 …

Member Avatar for Ancient Dragon
0
115
Member Avatar for ravi_forum

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 …

Member Avatar for Salem
0
894
Member Avatar for cessna172

[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 …

Member Avatar for invisal
0
128
Member Avatar for rabeb

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 …

Member Avatar for rabeb
0
177
Member Avatar for sara_84

typedef struct node node struct { int when i run the C program, compiler give me an error which is , is expected, help me

Member Avatar for iamthwee
0
168
Member Avatar for sa-al

i want to define a function that calculates the " integral" of a function

Member Avatar for Jishnu
0
84
Member Avatar for devilofangel

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 …

Member Avatar for Jishnu
0
119
Member Avatar for ashok1424

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 …

Member Avatar for InfiNate
0
142
Member Avatar for adiaforos

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) …

Member Avatar for Jishnu
0
112
Member Avatar for uber_noob

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 …

Member Avatar for Jishnu
0
93
Member Avatar for Barefootsanders

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 …

Member Avatar for Barefootsanders
0
128
Member Avatar for AbberLine

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 " "). …

Member Avatar for AbberLine
1
204
Member Avatar for kadeemdagreat

[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; …

Member Avatar for Ancient Dragon
0
132
Member Avatar for zeiken

I would like to request the basic tutorial in c programming pls help me because im still the beginner

Member Avatar for Aia
0
46
Member Avatar for chaosatom333

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; } …

Member Avatar for iamthwee
0
281
Member Avatar for bugmenot

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]; // …

Member Avatar for Narue
0
168
Member Avatar for iaaan

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 …

Member Avatar for iaaan
0
100
Member Avatar for meekblood25

please help me with this problem: i have to linked list, i need to compare them, and do something with regards to there result..

Member Avatar for Narue
0
61
Member Avatar for Ljupco

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 …

Member Avatar for WaltP
0
89
Member Avatar for ellas747

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 …

Member Avatar for invisal
-1
115
Member Avatar for rpjanaka

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. …

Member Avatar for Salem
0
101
Member Avatar for chaosatom333

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, …

Member Avatar for Salem
0
259
Member Avatar for sara_84

[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 …

Member Avatar for sara_84
0
150
Member Avatar for chaosatom333

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; …

Member Avatar for Duoas
0
267
Member Avatar for sara_84

i want a simple program to implemet the deterministic finite auyomata (DFA) using C language, this is code help me to let it work, this what i have currently and i convert it from C++ to C but i still have some error #include <iostream.h> /*#include<stack.h>*/ #include<stdio.h> #include <string.h> #define …

-1
69
Member Avatar for BensonRoss

Trying to write a program that will add two vectors (of type vect_t) and return a vector of type vect_t. Though I can't get my add_vect function to work. lots of redefinition errors telling me different basic types, and i can't figure out how to make it work right. Any …

Member Avatar for BensonRoss
0
96

The End.