15,551 Topics

Member Avatar for
Member Avatar for fatasscp

Hello World! I am trying to read in a list of numbers from a file and put it into an array. Please i would be unbelievably grateful if you could tell me whats wrong with my code. This is my code: [code] #include <stdio.h> FILE *fi; FILE *fo; int main() …

Member Avatar for me_roy
0
187
Member Avatar for plike922

We i compile this program is shows that percents as 0.... any suggestions. [CODE]#include <stdio.h> #include "simpio.h" #include "strlib.h" #include "random.h" #include <math.h> int main() { int g1, g2, g3, g4, w1, w2, w3, w4, p1, p2, p3, p4; string n1; string n2; string n3; string n4; //-------------------------------------------// printf("Enter first …

Member Avatar for Ancient Dragon
0
118
Member Avatar for sinner

please help me in this code please remove all these errors because i did not remove these errors due to beginner in c

Member Avatar for Aia
0
109
Member Avatar for plike922

I am trying to create a program that finds the GCD of two numbers using the brute force... So far i have this but my problem (I hope) is that i cant get the value of g into int main() Here is my program. Any suggestions? [CODE]#include <cstdio> #include "simpio.h" …

Member Avatar for Prabakar
0
171
Member Avatar for @bhi

I am getting an error when using the gcc compiler saying: /usr/bin/ld: crt1.o: No such file. No such file or directory collect2: ld returned 1 exit status Can somebody please explain what this means and how it can be rectified. Is it a problem with the compiler? Thanks in advance.

Member Avatar for @bhi
0
144
Member Avatar for sinner

this code in c++ please convert this code in c i really thankful to you because today i have shortage of time please do this for me

Member Avatar for ArkM
0
72
Member Avatar for lehe

Hi, When using "..printf Functions" with Conversion specifier type "%g", it gives different results under different environment. For example, "sprintf(string,"%g",1e-6);" gives "1e-006" in Windows (Visual C++) and "1e-06" in Linux (gcc). Maybe I am wrong about it. Is it possible to get the same format under whatever operating system or …

Member Avatar for ssharish2005
0
107
Member Avatar for triadR

hi, i've a code shown like this.. [CODE='c'] #include <stdlib.h> #include <stdio.h> #include <winsock2.h> #include <pcap.h> #include <remote-ext.h> #define ETH_IP 0x0800 // type: IP #define ETH_ARP 0x0806 // type: ARP #define ETH_ICMP 0x0800 // type: ICMP = IP #define ARP_HARDWARE 0x0001 // type for 802.3 frames #define ARP_REQUEST 0x0001 // …

Member Avatar for triadR
0
246
Member Avatar for rob_xx17

hello, I have a situation where I'm going to be generating a whole bunch of numbers. These numbers will be in the range between 0 and 1. What I will have to do is to separate these numbers into 100 different groups depending if the number is between 0 and …

Member Avatar for ArkM
0
115
Member Avatar for plike922

I am trying to fix this "error C2447: '{' : missing function header (old-style formal list?)" i looked over the program and cant find anything wrong. Here is my program. [CODE]#include <iostream> #include <stdio.h> #include "simpio.h" #include "strlib.h" #include "random.h" using namespace std; #define LowerLimit 0 #define UpperLimit 200 #define …

Member Avatar for VernonDozier
0
227
Member Avatar for plike922

I am trying to create a program that gets the solution of a quadratic formula, but i keep getting an error and i cant figure it out. 1>quad.cpp(14) : error C2440: '=' : cannot convert from 'int (__cdecl *)(void)' to 'int' 1> There is no context in which this conversion …

Member Avatar for dmf1978
0
173
Member Avatar for sasikala123

please tell me how to compute the maclaurin series sinx=x-x^3/3!+x^5/5!-x^7/7!..... I written below coding but i know it will not give correct output. can anyone help me to compute the series [code] #include<stdio.h> #include<math.h> Printf("Enter the n value"); scanf("%d", &n); main() { float x,i; float value,sinx; printf("Enter the x value"); …

Member Avatar for stewie griffin
0
3K
Member Avatar for plike922

I am having a problem when i compile a program. What happens is that i would compile program, run it, see a problem, fix it, then try to compile it again and i get LINK : fatal error LNK1168: cannot open C:\Documents and Settings\Eric 22\Desktop\Exercises\celsFahr\Debug\celsFahr.exe(example file) for writing. I don't …

Member Avatar for plike922
0
114
Member Avatar for guardians

Hi, I can't seem to get my program to work. I'm using qsort to sort some keyboard-input strings, but I get segmentation fault. I tried 3 versons, and none of them works. Could someone pinpoint the error? [CODE] #include<stdio.h> #include<stdlib.h> #include<string.h> #include<search.h> int str_cmp(const void *prv,const void *vtor); main() { …

Member Avatar for guardians
0
233
Member Avatar for xlx16

[TEX][/TEX]/* I need some advice on program bellow,this program is text program in this program by pressing arrow key you can change your position in the text and by enter key you can break a line and move the rest of the line to a new line but this program …

Member Avatar for ssharish2005
0
135
Member Avatar for puma8085

My project is to receive data from MRI machine, which has a com port can send serial signals. The data come thru pin3 of the com port and we want to save and read them on a pc. I've check the data with a spectrum analyzer and found the signal …

Member Avatar for ssharish2005
0
284
Member Avatar for adewale1

You are required to design a control system for a car park. You should produce your own design, ensuring that you have enough features to allow you to demonstrate that you can programme multiple tasks with inputs, outputs, decisions, communication and sequencing. The system features may feature space control, entry …

Member Avatar for Salem
0
89
Member Avatar for raja289

[url]http://s3.supload.com/free/lastscan-...3716.jpg/view/[/url] up there is description of code and here;'s code [CODE=c] #include<stdio.h> #include<string.h> float avg(float); main() { FILE *p[2]; int k,students=10,subjects=4,i,j,id_number,date_of_birth,fail=0; float marks[100],total=0,avg; char name[30],course_enrolled[30],filename[10]; for(i=1;i<=2;i++) { printf("filename"); scanf("%s",&filename); p[i]=fopen(filename,"w"); printf("Enter Name of Student\n",p[i]); fscanf(stdin,"%s",&name,p[i]); printf("Enter Course In Which Student Is Enrolled\n",p[i]); fscanf(stdin,"%s",&course_enrolled,p[i]); printf("Enter ID Number Of %s Enrolled in …

Member Avatar for raja289
0
403
Member Avatar for plike922

I am wonder how do you make it that you have to letters = to one number with only typing it once? Here is my program. My problem is that the result printf("%d reversed is: %d\n",num , res); is 0 reversed is: (The number backwords). [ICODE]#include <iostream> #include <stdio.h> #include …

Member Avatar for dwks
0
323
Member Avatar for SwiftDeath

Pls Help me, i am nearing the deadline July 30 of this case study and the code is almost finshed it does sort the input elements the way my algo logic does however i am not able to display the correct number of passes to show the law of the …

Member Avatar for dwks
0
146
Member Avatar for ramukneevan
Member Avatar for Narue
0
57
Member Avatar for jackassplus

I'm trying to work out what this does: [code] ptr = input_string; dest = input_string; while( *ptr && *ptr != '\r' && *ptr != '\n' ) { if ( *ptr >= '0' && *ptr <= '9' ) *dest++ = (char) ( (*ptr) - '0' ); if ( *ptr >= 'A' …

Member Avatar for jackassplus
0
126
Member Avatar for hoticejin21

guyz im having hard time of making a program that could run like a simple ATM machine using turbo c(using conditional statement and looping)... I can't think will coz the dealine of submission is on next week... could you gave an idea of that program.. pls??? i will just change …

Member Avatar for Adak
0
171
Member Avatar for vijaysoft1

Hi , iam trying to develop a simple text editor on Turbo C , that will accept values from the keyboard and print on the screen . I want a scrolling function . when i entered th data and press enter button it will come to the next line . …

Member Avatar for Adak
0
117
Member Avatar for ishaanarora

[QUOTE]Only the stronger will survive.( Charles Darwin)[/QUOTE] As i posted my first fifo error problem which was a practice thing .Now i am doing what i m supposed to do. I m making this code first which is running is background.whenever any one will write on the fifo it creates …

Member Avatar for ishaanarora
0
164
Member Avatar for rakeshbk402

Hello All, I am a fresher in c, i need to know about how to find out the size of a function defined & size of stack memory allocated for c compilers

Member Avatar for Ancient Dragon
0
185
Member Avatar for ishaanarora

i m writing a practice code to implement select with fifo. i m posting two codes along with : [CODE] CODE 1: Help with Code Tags (Toggle Plain Text) #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> #include<fcntl.h> int main() { int fd,rc,i; /* Making A FIFO names as fifo2*/ char data[100]; …

Member Avatar for ishaanarora
0
167
Member Avatar for flecture

hi cld anybody explain me the concepts of continue,break,return statement with an example using c program

Member Avatar for Ancient Dragon
0
245
Member Avatar for sinkingships7

I'm having a bit of trouble reversing a string. Here's a code snippet of how I'm currently trying to do it: [code=c] index_s1 = strlen(num_s1); for (index_s2 = 0; index_s2 <= strlen(num_s1); index_s2++){ num_s2[index_s2] = num_s1[index_s1]; index_s1--; } [/code]

Member Avatar for sinkingships7
0
117
Member Avatar for sinkingships7

Does anyone know a good way to do it? I've heard of itoa(), but it's non-standard and isn't included by default with the GCC compiler. If you believe that's the best way, how to I get my hands on the function? Ideas? HUGE EDIT: I made a stupid mistake and …

Member Avatar for sinkingships7
0
116

The End.