15,540 Topics

Member Avatar for
Member Avatar for tdk420n

Hi. I'm having a little trouble figuring this problem out. What I need the program to do is take an email inbox and print out only the Headers for each message. Assuming each max line length to be 1024. I can read the file line by line but I don't …

Member Avatar for tdk420n
0
184
Member Avatar for speedy94519

Hey guys Im having trouble printing out a string. Could someone help me out? I would like to enter a string like: "julie perez" and print out "julie perez" but my program only outputs "julie". The code that prints out only "julie" is the following: practice.c: [CODE] #include <stdio.h> #include …

Member Avatar for speedy94519
0
139
Member Avatar for Kombat

So what I want the code to do so far is take an expression lets say 35x + 17y = 5 and break it down into three values, 2 integers and a character. 35, 17, and + so I can tell it how to evaluate it. Here is my code …

Member Avatar for Radical Edward
0
99
Member Avatar for gameon
Member Avatar for Radical Edward
0
197
Member Avatar for mithunp

Trying to implement a stack using dynamic array. The Problem which i am facing is that if i a pushing 60 or 90 elements then the program is running fine but on inserting say 600 elements while printing the first two elements are showing junk value. Compiled the code using …

Member Avatar for Radical Edward
0
151
Member Avatar for Fr33t

I don't normally post in these kinds of forums and prefer to just google my way through problems, but after 3 hours of trying to solve this, I am beat. I am working on a program that uses a linked list and can add/delete/print out nodes (orbs in this program) …

Member Avatar for Banfa
0
220
Member Avatar for NH1

DOSRetCode = GetOpenSaveFile(►TARGET{PROP:Handle},►DOSDialogHeader,DOSTargetVariable,►DOSExtParameter ,DOSFileNameVar,1,►0) Where the black arrow is, thats where i get my error. the error says "No matching prototype available" i also get two more errors where the other black arrows are after the first one, they are, "Invalid variable data parameter type" And the last one is, …

Member Avatar for nbaztec
0
99
Member Avatar for muthu1802
Member Avatar for Ancient Dragon
0
189
Member Avatar for notdoppler

Hello Community i am using Linux (fedora) gcc compiler. Normally i use Java but for the Interprocess communication part we got C. My problem specifically is that when I read from a file with the fread() function and save it in a char buff[somesize] I cant use printf() to display …

Member Avatar for abhimanipal
0
176
Member Avatar for xaop

I need to create a program for reading two numbers,printing them,confirming them and then summing them up. Here is my attempt [CODE]#include <stdio.h> #include <conio.h> void main() { clrscr(); int a,b,s; char c,d; s=a+b; printf("Enter any two numbers "); scanf("%d %d" , &a, &b); printf("The numbers you have entered are …

Member Avatar for abhimanipal
0
131
Member Avatar for Savage221

Hello, I had a question regarding nested structures. Lets say you *have* to use the following structures: (disregard the numbers thrown in, I just tossed random numbers in). [CODE] typedef struct info{ char name[20]; char address[50]; char serial[15]; } PERSONAL; typedef struct person{ PERSONAL individual[50]; int number; } PERSON; [/code] …

Member Avatar for karthikeyans
0
261
Member Avatar for Alerwiali

Hello ..i am trying to get the factorial of large integers but i get 0 every time i try,,can anyone tell me why ,,,Thanks in advance . [CODE]#include<stdio.h> #include<conio.h> int factorial(int n); //main main() { int x,fact; printf("Enter a positive interger \n"); scanf("%d",&x); fact=factorial(x); if (fact==-1) printf("the number is not …

Member Avatar for Alerwiali
0
110
Member Avatar for TrustyTony

Do you know that there is clean way of doing what C-language ternary operator ? does in Python's recent versions. It is if with special twist. The syntax is: [CODE]'The value if true' if <condition> else 'Value when false'[/CODE] Values can be any type. You can put this structure to …

0
991
Member Avatar for darkdai

hi can anyone tell me how to write the output of this code to a file?? [CODE] #include<stdio.h> #define MAX 10 char array[MAX]; void main() { void addvalues(); addvalues(); } //funtiocn that will allowe the user to add the values void addvalues() { printf("------------------------> Insearting List Elements <---------------------------\n"); int i; …

Member Avatar for Aia
0
147
Member Avatar for joe_adelmo

Hi, I have to somehow modify a C-code by introducing a new array. We are in the chemical field: I have a small molecule (guest) inside the structure of a larger one (host). The existing array stores the square of the distance between a specific class of atoms: they are …

Member Avatar for Banfa
0
116
Member Avatar for manutd4life

Hello everyone, i need to enter a value into a savings account paying 7% interest and €1,000 is withdrawn from the account at the end of each year. How many years are required for the savings account to be depleted? here's wat i did, but the loop not working: [code=c]#include …

Member Avatar for Tellalca
0
89
Member Avatar for gkaykck

[CODE] char in[100], *temp[10],var[10][10]; int i, n = 0,fulval=0; double val[10]; var[10][]="ANS"; [/CODE] it should be simple but i cannot figure it out. I want to assign "ANS" to var[0][0,1,2] but it did not work?

Member Avatar for gkaykck
0
89
Member Avatar for fenerista

İs it possible now to use a system call in module programming ? after I "make" the module below I am getting warnings like that no errors WARNING: "sys_getcwd" [/home....mod/mod01/mod01.ko] undefined! [code] /* * hello-5.c - Demonstrates command line argument passing to a module. */ #include <linux/module.h> #include <linux/moduleparam.h> #include …

Member Avatar for fenerista
0
202
Member Avatar for yuvaraj.ragupat

Hi All, Can anybody explain here what is the different between normal function call and function to pointer call? How function to pointer is working internally? Why should we use function to pointer in call back? why not we call function call directly? Please pardon me ,if it is very …

Member Avatar for griswolf
0
985
Member Avatar for aliiya

hello hey i want to implement a program in c or c# for preemptive processor sharing tasks. can anyone plz help me out???

Member Avatar for s_sridhar
0
70
Member Avatar for socket_to_me

Hello. This is my first post, and I am fairly new to C. I am writing a socket program and I am getting a segmentation fault upon runtime. My program compiles fine. I'm pretty sure it is due to my implementation of my data structure. My struct looks something like …

Member Avatar for abhimanipal
0
92
Member Avatar for darkdai

does anyone know whats wrong with my function? [CODE] void quarter(detailstype info[]) { int i,j; for(i=1; i<4; i++) { printf("for month: %d", info[i].month); for(j=1; j<emp; j++) { info[i].qt1=info[j].sal_amount+info[i].qt1; } printf("%f", info[i].qt1); } }[/CODE] it is giving me this error: error C2111: pointer addition requires integral operand

Member Avatar for abhimanipal
0
93
Member Avatar for dnk77

Gday all, I am studying/part time teaching C++ in an australian technical college. I have been asked to write a problem and solution for a class of young students. This is what i have so far: The header file 'DIGI_O.OBJ' contains functions 'void setup(void), 'int Ain(void)' and 'void Bout(int)'. The …

Member Avatar for Nick Evan
0
70
Member Avatar for yasemin

Hi, I have a question regarding a program I'm writing in C. I have a few variables which I would like to assign a random number to. However the sum of all the numbers I assign should equal 1. I have not been able to find a way to do …

Member Avatar for finito
0
94
Member Avatar for azra36

i have an unhandled exception cx0005:access violation in VC6++ while i try to run my c code with main.exe it gives a window showing to send a error report or to debug, while i give debug, it takes to fwrite file an breaks at the point --> if (anybuf(stream))//this is …

Member Avatar for azra36
0
348
Member Avatar for gargi3542

hie all, i needed to make a code in simple turbo c for ethernet packet injection as well as data reception. I tried the code in windows but its not working. possibly due to linux based commands. plz help me..

Member Avatar for gargi3542
0
189
Member Avatar for brad82

Hey all, I am pretty new to C and am trying to make a basic HTTP server to learn more about sockets. I managed to get the sockets working fine, and sent some data to the browser when I hardcoded the data. However I am now trying to read from …

Member Avatar for Aia
0
108
Member Avatar for appunu

[CODE]#include <stdio.h> int main(void) { int a,b,c; printf("Enter the sides of the triangle"); scanf("%d%d%d",&a,&b,&c); if(a+b<c || b+c<a || c+a<b) printf("cant form a triangle"); else if(a==b==c) printf("eq triangle"); else if(a!=b && b!=c && c!=a) printf("sca triangle"); else if(a==b&&b!=c || a!=b&&b==c) printf("Iso triangle"); } [/CODE] am starting to code.. i have coded …

Member Avatar for NP-complete
0
118
Member Avatar for thomasekugm

Here is my assignment rules, i am stuck and cannot find what it is i am doing wrong. If some one could help me i would appreciate it * The main routine must be a 'manager' routine, which means o The function can declare variables o The function can call …

Member Avatar for Aia
0
152
Member Avatar for emmas4impact

Hello everyone my task is to write a [COLOR="Green"]program that reads quizzes from a file 'q.txt', randomly selects a number of questions, and presents them to the user one-by-one, collecting user answers. After user has answered all questions, program gives user the score. [/COLOR] please can someone give me the …

Member Avatar for abhimanipal
0
115

The End.