15,552 Topics
| |
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 . . … | |
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 … | |
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++) … | |
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 … | |
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 … | |
[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. | |
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() … | |
[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"); … | |
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] | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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); … | |
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? | |
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-- > … | |
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 … | |
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]); } } … | |
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??? | |
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 … | |
| |
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, … | |
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, … | |
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 … | |
Hi, Can anyone tell me the c code for taking snap and saving it to directory. Thanks | |
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 … | |
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 … | |
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.' … |
The End.