|
Home » Network Pages
A D V E R T I S E M E N T
Resource Directory
C Language Questions and Answers Page
- C Book Recommendations
Use this thread to recommend books on C. Please include a description of what this is book is good for, and not good for...
- A development process
Here's a development process I like to use. I'll use a program that counts letters, digits, punctuation, and whitespace ...
- C Draft Standards
For those who are interested, here is a current draft of the C standard, containing C99:A working paper containing the C...
- C guru help needed URGENT
I have a program , custom , thats eating cpu cycles by running getttimeofdayi searched around and found a way to load my...
- How to rebuild a library?
Hi again I would like to build upon one of my previous threads (Link), where the original problem has changed to a ne...
- Help (Malloc for beginners )
hello everyone i have an assigment and i dont understand how to write the malloc section. in my input i get names and te...
- Problem in converting.
Hi guys. I'm a new member in this forum and I have basic in C, I think. I have a bit problem, to convert from decimal to...
- Trouble with cos and sin function from math.h
When I compile my code, it can't find the cos or sin functions. Here are my #include statements. Code: #include #inclu...
- Raising an Integer to a power
Hello, I'm currently writing a program that is supposed to raise an integer to a power. However, the output keeps printi...
- Brand New to C; First Program and a Couple of Questions
Hey guys I'm brand new to C and I'm having a hell of a hard time so far. I'm currently writing one of my first programs...
- word occurence counter 'forgetting' about already saved word
The snippets below are from my program that gets words, then prints them with the number of occurences.It works almost f...
- New to C Programming, need help in a program
Hi to all, I'm 17 and from India, studying for the degree of Bachelor in Computer Application. C is one of the subjects....
- How to remove Segmentation Fault
The following code can detect a (single) macro name (stored in str1) from a file and store its definition (stored in str...
- Explain this program please
Code: #includeint main(void){ int i=4,j=-1,k=0,w,x,y,z; w=i||j||k; x=i&&j&& k; y=i||j&&k; z=i&&j||k; printf(" w= d x= d...
- sigaction structure initialisation
To initialise structures, instead of using memset() I've got used to doing e.g. Code: struct sockaddr_in serv = {0}; ...
- Help me please
I wrote this program. I want to divvy up the sentences to the words and store the words in an pointer array. But I got r...
- How to see all ASCII characters on Turbo C++ compiler output window?
I have the following code for which I need to no explanation,the doubt is about the seeing the output of all the 256 cha...
- Searching text file
Hey guys, I am having some trouble reading a file for a specific string then getting the next two lines of numbers after...
- datatype deduction
Without the prior knowledge that integers store 2 byte in C,or char store 4 byte,float reserves 'so and so bytes',...etc...
- Parallel threads for socket send recv.
Hello all, I want to create parallel threads for socket send recv in windows and linux instead of managing them in a sin...
- Inserting EOF in Binary File using C
Hi, I am facing problem in inserting EOF character at the end of the binary file. I read CTRL+Z for windows but it doesn...
- Geometric search intersection problem
Hello guys. I decided to post this in the C forum since its what I use, but its really a general problem. Please feel fr...
- Urgent helpppp
Im so bad in Cprogramming and i need help in this question iRent, a fictional car rental company, is currently having a ...
- fprintf isn't outputting anything to file
I am trying to use the following c code to print out an array that I have passed in. It should output the text in hexad...
- [HELP] Force stop for input
What are the ways to get a string input from user that stops accepting input when the input's length is already 30 witho...
- dup question - file io
Lets say i want to use an execl call to netstat and then pipe it to a file. I know i could use dup like so: Code: int ...
- does this compile for anyone?
I am getting an error message that I think is a problem with gcc, not the code itself. Thanks. Code: usr lib gcc x86_...
- Help with symbolic constants
Below is my code for a beginning type project. I am asking for help with defining constants. What other constants can I ...
- crashes during run time
why is the program crashing when I change 3000 to 4000 on this line char arrFilename[3000][MAX_PATH + 1]; Code: #in...
- My idea.
So, basically i'm new to programming especially in C. I can do web scripting, so I'm not completely new to the concept o...
- C String manipulations with switch statement
I'm very new to C programming, but I really need help with this assignment and the tutoring lab at my school wasn't much...
- serial communication and general issues
Hello Everyone I'm a newbe to these forums and my apologies if i post a few threads in wrong sections for these boards. ...
- [HELP] Deal Or No Deal game.
I've been having a problem on how to get started in programming this game, and the deadline is tonight after 8hours. Im ...
- How can I get input to stop at 'Esc' instead of n ?
I'm using Code::Blocks 10.05 in Win XP SP3. How can I get input to stop at 'Esc' instead of n ?This is the line of my c...
- Linked list
Hi.. i would like to know why this code is working : Code: #include #include typedef struct{ int m...
- Experimenting with SSL connections
you, the client, have to compare the certificate against a list of trusted certificate issuers and their public key. fo...
- allocate memory for constant string?
I have a struct Code: struct animation { char *name;} I am entering the animation names manually, e.g. "standstill" I...
- porting C code in MIPS
Hi, i am new to C programming, and want to advice you in general about good tips in order to port C code in small proce...
- Function returning function pointer : help
I wrote following program,Its compiling without errors but giving wrong output.output should be 2 but giving 0;Can anybo...
- Table lookup for functions..
hey guys im trying to make a table look up for a collection of functions so i have chosen to use a table look up with a ...
- Help with looping
Hello, I have the following code that works great: Code: #include int main(void){int v=1;int dist=1;int i = (500 100...
- Return value of sscanf
Hello everyone, I wanna ask that what is the meaning of the return value of sscanf? I've seen people use sscanf return v...
- having a little trouble with my program
I am a beginner and arrays functions are giving me a bit of trouble. I a trying to find the highest midterm score and hi...
- Splitting up my Gosper's Algorithm into multiple Functions
Code: Required Libraries#include #include #include Program Defined Specifics#define PROGRAMMER_NAME "Leigh McKenz...
- wnat to know some logic about gcd
i can calculate gcd between 2 and 3 number but how can i calculate gcd multiple nuber i,e 10 number 20 number .i need lo...
- need to solve simple c problem
Problem Name: Y = MXEveryone know that the equation of a straight line is Y = MX + C. But if C = 0, then the straight li...
- Expansion
Hi, I'm working through the problems in K&R and I'm having difficulty with a particular one. Code: *Write a function ...
- Issue with .so (Shared Object) Files
Hello there I'm dealing with a piece of C code today, which is supposed to run in MATLAB. Thus, I intend to make use o...
- Just Can't Get This Code to Work
Hello everyone I'm new around here, but that's pretty obvious. So I'll your time by skipping the introduction and getti...
- Creating a struct help
I am trying to make this scoring system into a struct, but I am not too sure what is wrong. Any nudges in the right dire...
- Need help identifying C variable types.
Hi guys, I need help with identifying type declaration of variable p. I've attempted, but I am not certain of my answers...
- Quadratic Equation function
Hello, so I am making a program to solve quadratic equations.. or at least I am trying to. I am running into a wall howe...
- Ternary operation
Hi all, Is there any alternative approach to substitute single if-statement such that If (condition) expression; with te...
- Input f(x) at runtime
I am trying to write a program to solve a given function and to ask for a new function at runtime, after solving the giv...
- Returning different types from a function
Hi all. I want the listfile() function to return both an int, and a char *pointer. How can this be done, other than us...
- Beginners question: returning a 2D array from a function
I've made a function read_data() that is supposed to take a file name as its argument and sort the data from the file in...
- New to this type of Programming, please help?
I just started a new programming class last week, using the free Microsoft Visual C++. This is all new to me, so I apolo...
- simple c code
Hello, I'm a C noob (not even a noob, a noob in development, a cabbage).Can anybody help me out? I'm trying to give comm...
- compilation error -
hi guys... i am having some trouble implementing an insert function for a linked list... this is my code so far.. Code...
- need help about string in c program
Code: #include#includeint main(){ char *p; printf("enter some thing:"); gets(p); printf("you have typed: s ...
- Out of this program?How?
Code: main(){int i;for(i=1;i Actually I meant "output* of this program?How?"Why am I getting an indefinite loop of 1?,...
- How can I make this program find standard deviation?
Hi. I am required to write a program that calculates the mean and standard deviation. So far, I wrote the program so tha...
- Poker statistics
I've been trying to create a program that will play a hand of texas holdem (7 cards) and then it'll keep track of the ha...
- Using fscanf to read text from a file.
Code: void main(void){ #include #include #include #define MAXSIZE 256 struct member_node{ char fn[MAXSIZE];...
- exit() call pthread_mutex_lock()
hi all,i my C program when i call exit() it calls pthread_mutex_lock() without any reason.thus send the prcess in deadlo...
- Write .ucf image into .ppm format
Hi there I'm dealing with a very interesting problem today. I'm given an image in .ucf format (Universal Communication...
- check the value return by struct s_client to a pointer not be zero?
Hi guys , i got segment fault , and when i trace , found it happens since the value of pointer which is returned by Stru...
- Strcmp
Hello, i am having a problem with the strcmp function. It seems that it always returns 0 even when the two strings are d...
- expected expression before ')' token
hi i am new to c, i keep getting this error. ":32: error: expected expression before ')' token" here is my code. Code: ...
- [HELP] Check if "Just do it" is in users input
Make and run a program that will accept a user input of not more than 50 characters and find set of letters that will pr...
- Tree Book indexing
anyone can help me guys, i am a newby here and need some help about the code and program... Desired Output;Index pages ...
- Initializing structure
I have this code which does not print "3" as it is supposed to Code: #include#includetypedef struct Node{int i;}Node, *...
- Silly-sounding compilor error
linked_list.c:113:6: note: expected ‘struct LinkedListNode *’ but argument is of type ‘struct LinkedListNode *...
- C programming using gcc compiler
Dear all, I am trying to do a program using gcc compiler to reverse a string input. I am stuck at the for loop which I t...
- diophantine representation
Please help me how to optimize the diophantine representation(ie.Representing any Number as a sum of two primes) using C...
- Beginner Question.
Hi all-I am new to C Programming and am working on a program to convert pennies to dollars, quarters, etc. I have email...
- Hide Structure Definition
Hi folks,Say I want to have a structure Code: mystruct.htypedef My_Struct{ int i;}my_struct,*my_struct_ptr; Is there...
- Simple c program-please explain output.
Code: int main(){ int a=7, t=0; t=--a+--a+a+++a; printf(" d",t);} output: 20 I could not understand why i...
- segment-fault happens when use pthread_mutex_trylock
I have struggling a week to fix a program , in the begining i got SIGBUS , but after many attempts still the program get...
- Counting 1-50 and pointing out odd and even numbers
Hello I've just started an introduction course in C programming at the University. I am currently struggling on the las...
- Populate char array using another char array and int array
This program is supposed to populate a char array with letters of the alphabet with a particular frequency that correspo...
- cannot initialize structure variables
Hi, i have a problem that is rather basic but since i am not a frequent developper this presents a difficulty to me th...
- Help needed in this simple bubble-sort program.
Hello, I've very recently started to learn to program (in general) with my first language being the ANSI C. I've found a...
- malloc and array of pointers
Hi all. I am trying to compile the below program and getting these errors: Code: |In function ?main?:|18|error: incomp...
- Read Strings From Text File Into Char Array
Good afternoon. I am writing a program that needs to open a text file, read the number of words in said file. and then,...
- Input student grades and report the # of students with A, B, C, & D.
Greetings, I was given the task to create a program that: 1. Lets you input grades from only 10 students.2. Prints a rep...
- make a cursor move using the arrow keys with ncurses?
anyone know how to make a cursor move using the arrow keys with ncurses?...
- knapsack
Hi guys,i'm reading a few examples about recurtion in the internet and came across this example: The 0-1 Knapsack Proble...
- Writing an array in a file
Hello everyone I'm not quite familiar with programming, so please go easy with me I'm trying to write an array into a f...
- Bug in my x86 emulator code on big-endian platforms. Need help tracking down
Hi, all. This one should be fun to figure out. This is some software I've been working on, going on about 2 years now. ...
- Makefile problem; create obj file outside the src folder
1 You should move your makefile at the root of the hierarchy instead of the src directory, that would be more logical f...
- To return a double value
Hi everyone When I take the help of pointers,by keeping the return type of the function as void,the program works fine,...
- getchar() error
Code: #include #define EOL ' 0'int main(int argc, const char * argv[]){ char sent[50]; int i=0; int cnt=0; char charac;...
- difference between int array and char array
What is the difference between an integer array and a char array in C? Is an integer array terminated with a sentinel ch...
- Memory allocation question
Hi. I have the following function which in the future will load all of the .so modules in a given directory with dlopen,...
- Parallel execution
Hey guys, I'm still getting used to C, but need to run a really large simulations in it. I have a very n00b question ab...
- What does this mean?
This is probelry a really daft question but can anyone point me in the direction of the followling piece of code Outcome...
- change text data in file
I have a parameters-data file in which I would like to change a parameter value. For some reason the program never reach...
- Conceptual Question, what does, "Endpoint Register" mean?
See the link below, page 12 for reference to my question. Below is the text where my question came from. I am working on...
- using malloc & realloc
Hi Everyone Is there a way to reduce the number of pointers used in this program using malloc itself. Code: #include#in...
A D V E R T I S E M E N T
|
Subscribe to SourceCodesWorld - Techies Talk |
| |
|