15,550 Topics

Member Avatar for
Member Avatar for nashmage

What im trying to do is use shared memory and increment a value in it so that i can test to see how many times i get the actual number i was looking for which is 4000000 or more/less. Im using 2 forks so that i have 2 child processes …

Member Avatar for Salem
0
117
Member Avatar for atman

Hello guys, I'm trying to collect user input which combines integers with letters, but whenever it reaches the scanf for char it skips it and goes to next integer, could anybody explain why??? is it because main returns an integer,? I tried setting void main(void), and it sais that main …

Member Avatar for WaltP
0
151
Member Avatar for coolbuddy059

Now-a-days I'm deeply interested in topics like hcking and virus.Can u suggest a link where I can create my own virus. Please help me

Member Avatar for boB_K7IQ
-3
125
Member Avatar for botter911

Hi, I have a problem here in the selection search because it reads the text but does not detect the position of the text like a is in the 2 position. the is in the 1 positon.... like that. But If I do this for characters it detects it. Any …

Member Avatar for Ancient Dragon
0
116
Member Avatar for RaDeuX

Okay, so my program is very close to completion. The only problem is that the program leaks memory. The deleteNode, deleteManager, and destroyList are the ones to blame, or so I think. When I delete a node other than the first one it works while leaking memory. However, when I …

Member Avatar for Salem
0
169
Member Avatar for supersabre

I am trying to create multiple trees after calling tree_holder. The number of tree is unknown until compile time. Since there are many trees, and i want to access them right away just like an array. I do not use linked list since it is too slow. I have written …

Member Avatar for supersabre
0
248
Member Avatar for Erikmmp

Hi everyone, I am trying to make a program that times how long it runs for in seconds or milliseconds or whatever. The unit of time doesn't matter, I just need to know if C has any function I could use to do this. So, just as an example, I'm …

Member Avatar for Erikmmp
0
123
Member Avatar for aamresh1

What sort of number does gmp.h generate - Binary or Decimal? Please need the answer a bit quickly. Thanks, Amresh.

Member Avatar for ArkM
0
87
Member Avatar for himanjim

Hi, I' studying various sorting techniques...And one thing I'm not clear about the complexity of the techniques... For e.g the complexity of bubble sort is Average Case=>O(n*n) Worst Case=>O(n*n) Best Case=>O(n*n) Obviously n is the no. of elements in the array... But even in the worst case i.e the array …

Member Avatar for Freaky_Chris
0
150
Member Avatar for xlx16

hello again i have three questions again: how can i use malloc or calloc for a two demontional arrays? is it true that A. calloc allocates memory in contiguous bytes, malloc does not ensure contiguous memory allocation? the third question which is a bit irrelevent to programming how memorey locations …

Member Avatar for Salem
0
368
Member Avatar for sambafriends

Hi, any body guide me a program how to convert octal to hexa decimal number using c lnaguage without using %x %o regrards, samba

Member Avatar for Demonisya
0
65
Member Avatar for lehe

Hi, I am sorting an double array, using qsort() #include<stdio.h> #include<stdlib.h> ... int compar( const void *arg1, const void *arg2 ) { return ( * ( double **) arg1 >= * (double** ) arg2 ); } .... int main(int argc,char *argv[]){ ... qsort(array, size_ct,sizeof(double),compar); ... } It turns out that …

Member Avatar for ArkM
0
88
Member Avatar for Dewey1040

I understand the algorithm SelectionSort, but once again my problem is the easy part( i think the college life is affecting my mind ). How in the world do you read in an unknown number of ints from a file? I thought i did it right but when i run …

Member Avatar for ArkM
0
94
Member Avatar for jbody

There is something that I saw and wanted to check if it is really wrong, as I thought. In the second edition of The C Programming Language 2nd ED by Brian Kernighan and Denis Ritchie, in the section of 5.2 Complicated Declarations, in page 109, it is written so, isn't …

Member Avatar for ArkM
0
116
Member Avatar for Dewey1040

I know there are multiple threads on Matrix Multiplication but all of them are either different from what i need, or are unanswered. I am trying to multiply two N x N matrices. The two matrices and N are all found in a file via argv[1]. I have spent hours …

Member Avatar for Dewey1040
0
146
Member Avatar for vishalsingwall

Hi, This is urgent if any one could please help me resolve the stated issue....... I know how to create cursors in ProC* and how to manipulate them. But I have to do it with a combination of C and MySql. Can any one guide me as to how the …

Member Avatar for Salem
0
132
Member Avatar for Dewey1040

I have searched google and the forums here and I couldn't find what i need, if there is a thread somewhere just forward me to it. I am attempting to create a program that will prompt a user for a string. The program will not recognize this string to be …

Member Avatar for Dewey1040
0
203
Member Avatar for blazen

Here is a simple substring type function that I wrote in C. [code=c] char *substr(char arr[], int pos1, int pos2) { char str[100]; char *sub; for (int i = 0; i <= (pos2 - pos1); i++) { str[i] = arr[i+pos1]; } sub = str; printf("Sub: %s\n", sub); // debugging purposes …

Member Avatar for ArkM
0
137
Member Avatar for Demonisya

Hello..... I want to ask you something..... My teacher gave us our final exam last October 16 & 17.... I want to ask you about this question: Create a program that could show this output * *** **** ****** using while or for..... what I put in my answer sheet …

Member Avatar for Demonisya
0
168
Member Avatar for T'Scoopz

I'm trying to make a linked list, what's wrong with my syntax for adding a node? [code=c] struct data { char name[20]; char number[10]; }; typedef struct node { struct data list; struct node* next; } Node; Node *head = 0; Node *tail = 0; Node *New = 0; void …

Member Avatar for William Hemsworth
0
91
Member Avatar for Susan90

Hey guys :) After a year of c++, teacher's announced we'll be learning C standard as well, starting with next semester. So anyway, I've been looking through some examples and exercises in a book and found 2 problems I can't seem to solve. (At least not in C). The first …

Member Avatar for Susan90
0
155
Member Avatar for vskumar19
Member Avatar for serkan sendur

hi, i need to create a c shared library on unix platform using korn shell. can you provide me with some sample codes please. thanks

Member Avatar for serkan sendur
0
127
Member Avatar for Clockowl

EDIT for moderators: Yes that "one might think that swapbuffer is slow" was me. Heh. :D Could someone change the topicname to "Optimizing OpenGL"? Thanks. Hey guys, I'm trying to optimize this OpenGL program, so the problem isn't C, but the program is. The program loads a vanilla WaveFront .obj …

Member Avatar for veelck
0
1K
Member Avatar for RenjithVR

Hi All, Can anyone tell me about a library that helps me to read contents from /etc/resolv.conf file and also update the same file with new entries. Does this possible with Resolver library routines? Any useful links or sample programs regarding this? Thanks in advance. Renjith

Member Avatar for stephen84s
0
193
Member Avatar for java_girl

Hi. This is NOT a homework assignment (self-interest only). The exercise asks me to write a function which accepts two strings and returns a pointer to the longer of the two. [code language="C"] #include <stdio.h> #include <stdlib.h> char* longer( char str1[], char str2[] ); char* str_ptr; int main( void ) …

Member Avatar for devnar
0
11K
Member Avatar for slimjimmer

Hi, In this piece of code in my program I am receiving the following error request for member âyâ in something not a structure or union. [code=c]struct intpair { int x ; int y ; } ; struct intpair makeintpair(int x, int y) { struct intpair temp ; temp.x = …

Member Avatar for Luckychap
0
94
Member Avatar for raja289

i am designing a code that will calculate tomorrows date but there is some problem with the code, when i enter year = 2008 or anyother month =12 day = 31 it gives tmorrows date as 1/2/2008 please help and tell me if i can do more improvements thanks [CODE]#include<conio.h> …

Member Avatar for devnar
0
117
Member Avatar for manojn1979

Hello [B]How to send a file from server to client. [/B] I am a bigger in C with unix, i am trying to read a file from server and display it in client , i got a separate code to read a file , and i tried to connect the …

Member Avatar for manojn1979
0
152
Member Avatar for rlp1938

I need to be able to calculate the size in pixels of a given piece of text from the font name and point size. Google has not turned up anything I can use as yet (or maybe understand). Clues anyone? Bob

Member Avatar for d0pedup
0
225

The End.