15,547 Topics

Member Avatar for
Member Avatar for AngusFloydKAOS

Hey so I'm trying to get one of my c variables to be a bash variable. Is there a way that I can do this?

Member Avatar for nezachem
0
107
Member Avatar for lionaneesh

I want to know what is const type in C and what is its uses etc. i dont know anything about this term used in C so please give detailed description...

Member Avatar for jephthah
0
117
Member Avatar for lyn.vita

Hi all, I'm trying to write the Hufmann code to encode a given file & give me the compression ratio. but when I run this programme, I'm getting segmentation fault. Can you please help me with correcting it ? [CODE] /*************************/ /*************************/ // HUFMANN.C /*************************/ /*************************/ #include<stdio.h> #include<stdlib.h> #include<input.h> #define …

Member Avatar for Adak
0
138
Member Avatar for jacksparao
Member Avatar for lionaneesh

[CODE]#include<stdio.h> #define SQR(x) x * x int main() { printf("%d", 225/SQR(15)); }[/CODE] why this program outputs 225 instead of 1 (according to calculation).

Member Avatar for aman rathi
-1
210
Member Avatar for jasneg16

im using <stdio.h> and <conio.h> only is there any solution so I can randomize result? I want to make a fortune cookie that randomize the reading. i am not familiar with iostream and stdlib thanks

Member Avatar for WaltP
0
142
Member Avatar for prade

i have done a little project on a turbo c compiler with some graphics in it...my teachers don't want me to use turbo c..can u suggest which other compiler i can use to run my code.......

Member Avatar for Ancient Dragon
0
88
Member Avatar for spursfan2110

Hi all! So our T.A. gave us a function to use in our programming assignment as follows: [code=php] struct node *delete_from_list(struct node *list, int examnum) { struct node *cur, *prev; for (cur = list, prev = NULL; cur != NULL && cur->examNumber != examnum; prev = cur, cur =cur ->next) …

Member Avatar for spursfan2110
0
2K
Member Avatar for BestJewSinceJC

I'm trying to write my own system calls. I have a .c file where I'm putting the system calls. My system calls use a struct, so I have declared a global variable that is an array of my struct. Lets just call it [CODE] //Stuff is the name of the …

Member Avatar for BestJewSinceJC
0
93
Member Avatar for serious01

hey guys, I've just joined this group and i have problem which i believe you can help!!!! I want to know how to make a c program read from an application program like Microsoft excel and them writes the results with its printf().

Member Avatar for serious01
1
130
Member Avatar for meisterluv

i'm trying run a cgi script from a c program using execve(). It seems to be able to open and run the cgi file. but instead of actually generating graphical html it generates html code. example: execve("this.cgi", NULL, NULL) will generate: [CODE] /this.cgi /this.cgi <html> . . . the rest …

Member Avatar for gerard4143
0
237
Member Avatar for johndoe444

Is this possible to write a variable argument macro like this: [CODE]#include <stdio.h> #include <stdarg.h> #define func(x, ...)\ {\ va_list ap;\ va_start(ap, x);\ int y = va_arg(ap, int);\ printf("y is %d\n",y);\ }\ int main() { int x; func(5, 4); return 0; }[/CODE] I found an interview question which asked how …

Member Avatar for johndoe444
0
113
Member Avatar for ryanleslie

Error message: "error C2181:1> illegal else without matching if 2>fatal error C1075: end of file found before the left brace '{' at 'c:\documents and settings\tjeo1\my documents\visual studio 2008\projects\new\newc\exercise.cpp(3)' was matched [CODE]#include <stdio.h> int main (void) { int c; printf("letter="); c = getchar ( ); if (('0' <= c && c …

Member Avatar for jonsca
0
95
Member Avatar for OzY360

Hi I had a quick question about the libraries in C. Is there anything available like the java api library (java.sun.com) but for C? The closest thing I can think of is the MSDN Library but I'm not sure. A comprehensive guide that describes what the various libraries do would …

Member Avatar for OzY360
0
133
Member Avatar for illIAm

Hi have done the whole program but now am stuck at what initially seemed like a simple thing a repitation loop the program is supposed to ask the user if he/ she wants to continue with adding more data - if no exit and continue with the other stuff. [CODE]char …

Member Avatar for Xufyan
0
15K
Member Avatar for lionaneesh

The books i have already read :- 1. C ANSII Edition ( Cant understand their language ) 2. C tutor 3. Pointers and memory ( Stanford )

Member Avatar for Narue
-1
246
Member Avatar for spursfan2110

Hey, just curious. Is atof() a C++ only function or will it work in standard C?

Member Avatar for Narue
0
121
Member Avatar for Iam3R

1. Why Nesting of comments is not supported by c. code does not involve much complexity to have that. 2. Why Array partial initialization have zero appended. why it cannot do in normal declaration. 3. continued.... Thanks, 3R

Member Avatar for Narue
0
188
Member Avatar for patsfan

He guys, I am trying to figure out what is wrong with this code for level traversal in binary tree in C. I would really appreciate any help or suggestion or changes in my code. [CODE] status level_traverse( tree T, status( *p_func_f ) () ) { tree *node ; queue …

Member Avatar for abhimanipal
0
115
Member Avatar for ndovu

I am new in C programming and I would like help to make the following program: A program that reads a file (file name you can get from command line arguments or ask from the user) and produces output that counts the 10 most frequent words in the file and …

Member Avatar for Adak
0
133
Member Avatar for jessicacarl
Member Avatar for VernonDozier

I have some code that works. However, when I try to make it not work (i.e. try to execute a non-existent program), I don't see any indication that it hasn't worked. Here's the code snippet. [code=C] pid_t pid; // char *const paramList[] = {"/usr/threshold/bin/preconfig.sh", options[indexSelected].optionName, NULL}; const char* paramList[] = …

Member Avatar for VernonDozier
0
7K
Member Avatar for formulajake88

Hello everyone! I'm a beginner in C programming, and am writing code that is supposed to read in all the data from a formatted file, parse it into useful values, and then manipulate these values. However, I'm stuck on the the parsing part. I'm relying heavily on pointers, which I'm …

Member Avatar for jephthah
0
489
Member Avatar for Yggdrasil

During a university project, I had to print some int arrays to the screen, and I wanted to do it with printf. So I decided to include a function that converts an integer array into a string type, and passes the string out to the calling function. But the function …

Member Avatar for jephthah
0
167
Member Avatar for spursfan2110

This isn't entirely a programming problem, but it may be at its base, which is why I'm bringing it to you guys. For my assignment, I have download a .txt file from my prof's webpage, and then have my program open it. The file, when opened in a web browser, …

Member Avatar for spursfan2110
0
110
Member Avatar for priyankapandey

can anyone explain how can a function return a double pointer with which a 2 dimensional array can be traversed, this function takes the number of rows and columns as arguments: like: void ** function(int row, int col) { void **returningPointer= NULL; void*p; for (i = 0; i < row; …

Member Avatar for Narue
0
1K
Member Avatar for urbangeek

problem was first posted [URL="http://www.daniweb.com/forums/post1174806.html"]here[/URL]. lionaneesh got a problem with this question. I tried to solve that question myself. He solved himself, but i failed. the questions is: This program/function will delete all those characters in the first string i.e str1[] that matches any character in the second string i.e …

Member Avatar for urbangeek
0
112
Member Avatar for lionaneesh

[CODE]#include<stdio.h> void squeez(char s[],char z[]); int main() { char s[100] = "Hey wassup !!!!!!"; char z[100] = "Wow cool!!!!!"; squeez(s,z); return(0); } void squeez(char s[] , char z[]) { int j,dummy = 0,i=0; char x[100]; for(j = 0 ; s[j] != '\0';j++)/* the starting loop */ { while(z[i] != '\0') …

Member Avatar for urbangeek
1
267
Member Avatar for tyliang

Error at line 56 and 68. Unable to resolve it. [code=c] #include<stdlib.h> #include<stdio.h> #include<ctype.h> #include<string.h> #include"stack.h" #include"queue.h" #include"calcstack.h" #define MAXSIZE 80 void intopost(stack *stackPtr, queue *queuePtr, char expression[]); void pushvalue(queue *queuePtr, char item); void pushop(stack *stackPtr,queue *queuePtr,char item); void noBracket(stack *stackPtr,queue *queuePtr,char item); void removeBracket(stack *stackPtr,queue *queuePtr,char item); int precendence(char …

Member Avatar for mitrmkar
0
238
Member Avatar for khan001

plz help me in this code . its not giving the output plz correct my code [CODE]#include <stdio.h> int main() { double fahr , celsius; printf("Enter the temperature in degrees fahrenheit:"); scanf("%d",fahr); //convert to celsius celsius = (5.0 / 9.0) * (fahr - 32.0); printf("%if temperature in celsius",celsius); return 0; …

Member Avatar for mitrmkar
0
140

The End.