15,547 Topics
![]() | |
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? | |
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... | |
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 … | |
[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). | |
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 | |
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....... | |
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) … | |
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 … | |
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(). | |
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 … | |
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 … | |
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 … | |
![]() | 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 … ![]() |
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 … | |
The books i have already read :- 1. C ANSII Edition ( Cant understand their language ) 2. C tutor 3. Pointers and memory ( Stanford ) | |
Hey, just curious. Is atof() a C++ only function or will it work in standard C? | |
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 | |
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 … | |
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 … | |
C video tutorials for beginners [I]<<snip>>[/I] | |
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[] = … | |
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 … | |
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 … | |
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, … | |
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; … | |
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 … | |
[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') … | |
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 … | |
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; … |
The End.