No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Re:
hello friends :) well can anybody tell me why does this code [code=c] for (i = 0; i < 10; i++){ childpid = fork(); if (0 == childpid){ /* This is the line that is different in parts A and B. */ execlp("some_prog", "some_prog", (char *)0); exit(2); } else if … |
|
Re:
hey...can anyone show me what am doin wrong here?? cant get this program to loop till the user enters a character other than "y"....it prompts the first time and its a succes. prompts the second time but does not wait for response.... [CODE]#include <stdio.h> #include <string.h> #define LEN 20 main() … |
|
Re:
I made this program to create a binary search tree but it is not working properly ......could smbdy tell me whts the prob /* Creating a BInary Tree */ #include<conio.h> #include<stdio.h> struct node { struct node *lt; struct node *rt; int data; }*temp; void inorder(struct node* root) { while(root != … |
|
Re:
If I have a struct defined as [code] struct node { char *data; struct node *next; }; typedef struct node* nodePtr; nodePtr newNode; ... int main(void) { newNode = (nodePtr *) malloc(sizeof (nodePtr)); //dynamically allocate memory if(newNode == NULL) { printf("Error: could not allocate a new node\n"); exit (1); } … |