15,552 Topics

Member Avatar for
Member Avatar for The 42nd

Hi once again. As the title implies, the goal of the following code is to create calculator for operations +,-,*,/ and ^. However, the operations are to be executed on values in the files I arbitrarily named a.txt and b.txt. a.txt contains following data: a1 era1 a2 era2 . . …

Member Avatar for zeroliken
0
130
Member Avatar for ricardo.crudo

I need know what is the size of a address of one variable, in other words, how much bytes I need to store the address of a variable (in compilation time). Unhappily not is possible use sizeof in define pre-processors, like this: [CODE] #define ADDRESS_SIZE sizeof(void *) [/CODE] So, I …

Member Avatar for ricardo.crudo
0
85
Member Avatar for theUserMan

Need some help computing the geometric mean of an array this is what I have so far... i'm not really sure why i'm suppose to use pow [CODE]include math.h include int geomean(int *myarray, int count) { double geo = 0; double count = (double)count; for(int k=0; k < count; k++) …

Member Avatar for zeroliken
0
493
Member Avatar for challarao

Hello, I wrote two programs which sort first names which are already sorted by their last names.One is with Selection sort and the other is with Quicksort! The question is , "is any one of them stable?." "If the names with same first names are still in sorted order by …

Member Avatar for WaltP
0
321
Member Avatar for DiabloInC

The purpose of this code is to open a file, read a passage and delete any word that is "secret", it is then to save the new passage to a new file. Problem: [Warning] passing arg 1 of `strcmp' makes pointer from integer without a cast I think I know …

Member Avatar for zeroliken
0
262
Member Avatar for manjeet593

[COLOR="green"]10 Coins Puzzle[/COLOR] Hello Friends, I m facing problems in coding of 10 coins Puzzle. I have made it, but the process was not good enough. I think there is a recursive process to sole this problem, but i couldn't get it. Plz help me out with efficient algorithm/code.

Member Avatar for Adak
0
133
Member Avatar for BlZbB

hello everyone I write project, there is problem in linking of my code [CODE] Error 1 error LNK2005: _str_list already defined in file1.obj string-test\file2.obj string-test Error 2 error LNK2005: _str_list already defined in file1.obj string-test\str.obj string-test [/CODE] think this is my code, anybody have any idea [B]main.c[/B] [CODE] int main() …

Member Avatar for WaltP
0
255
Member Avatar for gourav1

[CODE]#include<stdio.h> #include<conio.h> struct egde { int nodeno; struct edge*next; }; struct node { int nodeno; struct node *next; struct edge *link; }; struct node*graph=NULL; typedef struct node node; typedef struct egde edge; node*find(int); void insert_egde(); void insert_node(); void display(); int main() { int ch,i,j; do{ printf("\ninsert node"); printf("\ninsert edge"); printf("\ndisplay"); …

Member Avatar for mikrosfoititis
0
252
Member Avatar for twistercool

Just a Question on C programming basic some instructors have different ways of using either getche() or return 0; as bottom code on main function. Which is more better to use getche() or return 0;?[code]Getche() vs return 0;[/code]

Member Avatar for Moschops
0
274
Member Avatar for ZedChu

Hi, I have linkend list in my program and I need to swap two elements. [CODE]typedef struct { int day; char month[10]; } LData; typedef struct element LElement; struct element { LData data; LElement *next; } typedef struct { TLement *head; } TLinked; [/CODE] Then some basic functions - initialization, …

Member Avatar for zeroliken
0
89
Member Avatar for sharathg.satya

hi all Can we (compile and execute) or just execute a c file from another c file? am asked this question and i am unable to find any solution to this problem. A 'c' file is executed and it must contain code that will execute another 'c' program olease help …

Member Avatar for Narue
0
239
Member Avatar for manju1438

hi all, i got stuck up in running a C program(project).it says 'binary not found error'. i am able to debug it,under ARM cortexa8 configuration. here what does refer to.....is it .exe file or .axf file. how can we generate those .exe and .axf files. anyone please clearly explain running …

0
75
Member Avatar for terence193

I wrote this program and am trying to simplifying by creating a character array. How can this be done please? I found some help here [URL="http://www.java2s.com/Code/C/Data-Type/Forloopachararrayusingpointer.htm"]http://www.java2s.com/Code/C/Data-Type/Forloopachararrayusingpointer.htm[/URL] but couldn't really implement that in my program. [CODE] //inputs five strings representing integers, converts the strings to //integers, sums the values and prints …

Member Avatar for sfuo
0
104
Member Avatar for thebiff

Hi there i am trying to make a program that takes multiple files from the command line. I think i have got my my word count working right, but my question is how do i get it to read multiple files on the command line. Like when i do ./a.out …

Member Avatar for thebiff
0
357
Member Avatar for cka91405

Im writing a code that ask for two positive integers entered from the keyboard. The first integer N is odd in range of 3-15 and the second with be an initial value I. N will be the size of the array. Beginning the center of the NxN array with the …

Member Avatar for Adak
0
275
Member Avatar for pintuoo

[CODE] #include<stdio.h> #include<math.h> #include<string.h> // function prototype int rv (int, int [], double []); //main function int main() { int n; int res[10]; double vol[10]; double I[10]; double C; int i; for (i = 0; i < 10; i++) { printf("Enter R and V for resistor %d: ", i+1); ReadRes(i,res,vol); …

Member Avatar for sharathg.satya
0
97
Member Avatar for Zssffssz

I am making a staid lib that does some simple math but whenever I go to do something in time_t, time64_t, or bool it gets a "expected ; before FUNCTIONNAME." how would I use time_t, time64_t, and bool in a static lib?

Member Avatar for Narue
0
72
Member Avatar for rockerjhr

so i have to make a function that displays the binary representation of a 32 bit integer this is what i have [CODE]#include<stdio.h> #include<stdlib.h> #include <string.h> #include<stdio.h> void inttobin(int c) { char * s ; char * p ; size_t n = 8*sizeof(unsigned int); p = malloc(n*sizeof(char)); while (n-- > …

Member Avatar for Narue
0
126
Member Avatar for Gaiety

Hi, I have recently gone through some C internal stuff, addressing schemes(logical,relocatable and physical). what i dint get here is how are these inter-related.I do understand that these three are genearated by different tools. I want to know how exactly one is useful for other in executing the program in …

Member Avatar for Gaiety
0
152
Member Avatar for mahavairavan

Hi all, Can anyone please enhance the following code to print a string reverely ina consecutive manner using two dimensional array. The program which i tried in codepad.org is follows: [CODE]#include<stdio.h> #include<string.h> int main() { char a[4][4]={'j','u','s','t'}; int i,l,j,k,b=4,n; printf("Enter the string"); printf("\n"); for(i=0;i<1;i++) { for(j=0;j<b;j++) { printf("%c",a[i][j]); } } …

Member Avatar for Tumlee
0
1K
Member Avatar for rithish

i used turb0 c++ in windows 7 but i does not display a full screen mode.are there any tools that run c and c++ in windows 7???

Member Avatar for Schol-R-LEA
0
405
Member Avatar for schrei

Hi, I'm looking at shared memory in C and I seem to have encountered a bit of a problem. I'm fairly sure that I may be misunderstanding something here. I'm trying to send an array of structs to another process via shared memory. When the other process goes to read …

Member Avatar for schrei
0
303
Member Avatar for arunsolo1984
Member Avatar for c fan

I am new in c and dont know how to make a database in it i know that there is no database connection with c but i want to make project on employee data using file processing like this 1. add (employee name, age, contact number) 2. edit (employee name, …

Member Avatar for Ancient Dragon
0
239
Member Avatar for Panathinaikos22

Hello, is good idea to mess data using array? is this good way to encrypt an message? [CODE] char x[50]; gets(x); for(int i=0; x[i]; i++) { printf("%c", x[i] + An mathematic function here); // Example printf("%c", x[i] + (1800 /2) ^3 * pi); } [/CODE] Here is something i create, …

0
47
Member Avatar for UNDER-18 FG

Hey guys, I wrote a program and this 2 lines came up with the same error declaration: [ICODE]Scanf("((%d/%d)*%d)", &Mark1, 40, 100; Printf("Average of marks is: %.3f", Avg);[/ICODE] Both these lines came up with these error comments below: Line 1: Function "Scanf" should have a prototype. Line 2: Function "Printf" should …

Member Avatar for UNDER-18 FG
0
145
Member Avatar for steffisusan

Hi, Can anyone tell me the c code for taking snap and saving it to directory. Thanks

Member Avatar for Tumlee
0
144
Member Avatar for roxynatal

hello every body, My name is roxy and i am from brazil.I want to expand IPv6 address using inet_pton().After that increment the address by 1 using C code.If my address is - 1234:12::ffff then after expand it will be 1234:0012:0000:0000:0000:0000:0000:ffff When I increment the address it will display - 1234:0012:0000:0000:0000:0000:0001:0000 …

0
38
Member Avatar for vivosmith

Hi, I am trying to figure out allegro, and so far, so good. But I ran into this one snag in this code [CODE]const float FPS = 60;[/CODE] Does this set FPS? Someone on another forum said no, but it seems like that it is a predefined function that changes …

0
154
Member Avatar for trinetra31

Hi, hello everyone. I am having troubles modulating these dtmf codes in visual studio 2008 in C. After going to Properties and selecting compile as C code, i complied it( F7) and then debuged it(F5) and then i was stopeed by this error window saying: Unable to start program 'C:\Users\Trinetra\Documents\nltvc\dtmf\Debug\dtmf.exe.' …

Member Avatar for Ancient Dragon
0
283

The End.