15,552 Topics

Member Avatar for
Member Avatar for Gordon209816

Im having a few problems with completeing a adress book program in c (not c++ jus regular c), it requires a minimun of 5 functions so i have decided to use add, search, veiw now in order to complete i wud like to keep the add function but make a …

Member Avatar for Adak
0
116
Member Avatar for Xufyan

how to print the min value from an array ? i just understand the logic of printing max value, i tried so much to print the min but didn't find any clue... here is the program for max value: [CODE] int main(void) { int num[5]; int i,max=0; for (i=0;i<5;i++) { …

Member Avatar for jephthah
0
138
Member Avatar for tcstom

I have some data in the memory which is pointed to by a pointer (ptr2data), how do i pass this data to a function which accepts unsigned long/DWORD data types? [code] unsigned long* ptr2data; DWORD temp; ptr2data = (unsigned long*)&SomeArrayOfData[4]; temp = (DWORD) tempSerNum; AddDevice(7, temp); [/code] The above code …

Member Avatar for tcstom
0
138
Member Avatar for mystb

Hi everyone, I'm trying to code a program that uses RSA to encrypt your message. I assume you know it but if you don't know let me explain simply: [QUOTE]Your enter a word (actually it is a sentence but for now a word) then program will convert letters to numbers …

Member Avatar for mystb
0
287
Member Avatar for Xufyan

Please see this program: [CODE]float area(float); void main(void) { float radius; printf ("Enter Radius"); scanf ("%d",&radius); printf ("Area is %f",area(radius)); } float area (float rad) { return (4*3.142*rad*rad); }[/CODE] please explain the above program, there no value has been assigned for [iCODE]rad[/iCODE] then what does it mean ? why it …

Member Avatar for Sodabread
0
101
Member Avatar for bperiod

[Linker error] undefined reference to `__cpu_features_init' comes to [CODE]#include <stdio.h> int main(){ char c; printf("Hello World!"); scanf("%c", &c); } [/CODE] I don't think that it's code problem. What can I do? (Dev C++ newest version) (I tried reinstalling DEV C++)

Member Avatar for Fbody
0
821
Member Avatar for ilkeamasya

As you see at below I used "-1" as my sentinel value but my program wants the other 6 values i asked for in scanf too. How can i solve this problem? I just want the user to enter -1 and exit my loop. I would greatly appreciate for your …

Member Avatar for ilkeamasya
0
245
Member Avatar for ilkeamasya

Hello, there. I'm trying to write a program which reads student information from keyboard and does some calculations. I've just started it and I dont know much about this "Struct" topic. As far as I know, I've tried to do something and here is the result. [CODE]#include <stdio.h> #define N …

Member Avatar for ilkeamasya
0
247
Member Avatar for vinians

Hi Im new to this comunity and Im in throuble with C heheh. My problem is that: Im using LUA to create scripting capabilities do my software in C. So, I ve created a file called script.c to suport all script code of my project. See: [B]script.c [/B](some lines) [code] …

Member Avatar for vinians
0
99
Member Avatar for Paulo Julio

Need help for simple program, don't have a clue about C. Please, can you help me? I have 3 errors - Undefined symbol i - Undefined symbol y and - Compound statement missing See the program bellow: [CODE]#include<stdio.h> #include<conio.h> #include <math.h> void main( ) { float a, b, c,x3; float …

Member Avatar for jephthah
-3
114
Member Avatar for COKEDUDE

I have 3 files. variables.h, variables.c, and dictionary_test.c. How would I use my variables.c to get information from variables.h and dictionary_test.c? I'm not supposed to touch the variables.h and dictionary_test.c. I gotta do all the work in variables.c. This is the variables.h. [CODE]#define MAX_VARIABLE_LENGTH 15 /* Set the variable with …

Member Avatar for COKEDUDE
0
139
Member Avatar for coconauts

how do i get the child id without calling wait? is there a way to put wait information back so another waitpid can get it...? [CODE] void sigchld_handler(int signo) { pid_t p = wait(NULL); ... } [/CODE]

Member Avatar for Salem
0
105
Member Avatar for rickymak

I have this error, " lvalue required as left operand of assignment," for line 10 where scanf command appears. I can't figure out a solution to it. [CODE]#include <stdio.h> int main() { int start; char delay; printf("We're close to blast off.\n"); printf("countdown initiated"); scanf=("%d", &start); do { printf("T minus %d …

Member Avatar for UncleLeroy
0
124
Member Avatar for jgehlot09

I am writing a simple code in c to extract the values from string for ex-P23V32 gives me output of 23*32. But when I am trying to use the isalpha() and isdigit() to check whether the value is a charecter or a digit, the compiler return always zero. Here is …

Member Avatar for jephthah
0
205
Member Avatar for riahc3

Hey Im doing a loop with somthing similar to this: [code=C] char stn[25]; do { printf ("Insert a number:\n"); gets(stn); }while (stn!="123"); if (str=="123") { printf ("Good value!"); } [/code] Now if I input 123, it enters the if that prints "Good value!" and the program ends naturally. Now if …

Member Avatar for jephthah
0
196
Member Avatar for bongoboia

Hi to all, I have a problem and can't understand why this happen... I'll explain all now. I'm not a very good programmer, I'm just starting and I'm doing a program that must run on linux like a daemon. The job of this program is to take all the characters …

Member Avatar for nezachem
0
158
Member Avatar for veeresh.k

hi... 'm findin it difficult to access system date in a c program.. pls help me... N also to write code fo airline reservation in c...

Member Avatar for Salem
0
117
Member Avatar for praddy85

Hi, Im a novice and im implementing a mp3 player. Im using the concept of doubley linked list for moving between songs in the directory... I have enclosed the code also.. the error i get is next_previous.c:80: warning: assignment makes integer from pointer without a cast next_previous.c:81: warning: initialization makes …

Member Avatar for Narue
0
83
Member Avatar for Signal_Hill

Hello All... To be honest, this is a bit overwhelming, but I'm hoping that someone might be able to steer me in the right direction. I am currently taking a correspondence course in Computer Programming, and without instructional support, am finding that the material can be somewhat overwhelming. I'm looking …

Member Avatar for Adak
0
90
Member Avatar for tquiva

I need to create my own function to compute the cos of an angle (given in radians) using the Taylor series. The task is to create a function in which a float value is passed to it, and a double gets returned. My program compiled, but I am getting wrong …

Member Avatar for jephthah
1
297
Member Avatar for fattymuffin

Hello, So my problem is that I am supposed to write code in order to prove whether or not text in a file is topologically sorted correctly. I have the algorithm on how to do this, but the specifications say that I should use an array of lists to keep …

Member Avatar for tcstom
0
104
Member Avatar for deeep

Hi we have a buffer say [COLOR="Red"]char array.[1].[/COLOR]so the size will be 1 byte. Now our problem is say we have 8 bits data say 10110101. now this must be assigned to array[0] variable as 1 byte. bit manipulation is not happening.kindly help us in this regard If possible post …

Member Avatar for jephthah
0
167
Member Avatar for rlhh

I'm trying to create a maze with a mouse inside moving up down left right in 200 moves. I've got everything working besides the fact that it duplicates the heart on the other side(If it exits on the left, it'll be duplicated at the right end) when the heart shape(mouse) …

Member Avatar for jephthah
0
192
Member Avatar for seaman34

Hello this is my first thread on the forum i tried to search everywhere for a solution but no result...:'( Im trying to figure out some easy pointer use but still get some stupid error... My fault. error C2440: '=' : cannot convert from 'char (*)[100]' to 'char' [CODE] void …

Member Avatar for p.y.
0
153
Member Avatar for mrblippy

hello everyone, i have been given a task in my class to create a student database. it has to be able to allow a user to enter a class code, class name and a linked list of students enrolled in the class. the struct we have been given to use …

Member Avatar for Ancient Dragon
0
113
Member Avatar for lotrgandalf

I am getting unpredictable behaviour from malloc(). Here is the code fragment: [code=c] float **t; t=(float **)malloc(sizeof(float *)*A); perror("\nError status 1:"); for(i=0;i<600;i++) { t[i]=malloc(sizeof(float)*B); } perror("\nError Status 2:"); [/code] The objective here is to have a dynamic 2D float type array. For testing purposes though, I have hard coded the …

Member Avatar for lotrgandalf
0
106
Member Avatar for schwarznavy

Hi. I'm trying to call a function to convert a decimal integer into a binary number (stored as an array of integers). Before I knew that I couldn't return an array, this is how I thought to implement it. Can anyone help me understand the way I'm actually supposed to …

Member Avatar for schwarznavy
0
148
Member Avatar for r5berndt

Hey guys, Im new here so I hope this post is in the right spot. Im trying to get my code to callout to the other functions. When I debug the code, it only executes the Int Main section of my code. Can someone help me out and explain how …

Member Avatar for Fbody
0
101
Member Avatar for rajesh.c

i m using char pointers to take data from char arrays of 4096 bytes and storing them into a file. the problem is............ if the data consist of only one buffer than the two datas are same but if there are more than two buffers than the data is different …

Member Avatar for Fbody
0
107
Member Avatar for xx_infer

hi, i have problems using exec(), I need to pass a set of numbers using exec to another program that is supposed to use them to calculate something,,, i dont know how to pass them any suggestions??

Member Avatar for Salem
0
103

The End.