15,552 Topics
| |
Hello, this type of structures are confusing. I hav been working with C for a while but this subtlety is yet unknown. I have come accross such a structure in a program where suposedly it will be used for FIFO management: [CODE=C] typedef struct FIFO_TAG{ struct FIFO_TAG *NextElement; }FIFO; [/CODE] … | |
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() … | |
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 … | |
please help me in this code please remove all these errors because i did not remove these errors due to beginner in c | |
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" … | |
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. | |
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 | |
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 … | |
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 // … | |
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 … | |
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 … | |
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 … | |
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"); … | |
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 … | |
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() { … | |
[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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … | |
i want the code for the concatenation of two data without using strcat | |
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' … | |
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 … | |
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 . … | |
[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 … | |
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 | |
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]; … | |
hi cld anybody explain me the concepts of continue,break,return statement with an example using c program | |
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] |
The End.