15,554 Topics
![]() | |
Can someone tell me how to write ` void readBinaryTree(BinaryTree *&p, ifstream &fin) {` in C ... `void readBinaryTree(BinaryTree **p, ifstream *fin) {` `readBinaryTree(&p, fin)` ??? Thanks | |
Hi All, I am somewhat confused about how to put this before you, so pardon me if it creates confusion in your head. **Requirement**:: To write a removal Tool for a Software. **Language**:: C (preferred), C++ (Will do), Windows API (Will also do) **Problem**:: The problem is where and how … | |
This is a basic question, but I can't seem to understand how this works: Suppose I pass a structure pointer to a function, do I need to malloc memory for this passed pointer inside the function? e.g., typedef struct example_data_ { int serial; char *name; } example_data; int main() { … | |
when i execute this code and lets say i enter "hello", then "world", and then "dude", when i traverse through the list, it only prints out: dude dude dude and not this: dude world hello Any help would be much appreciated! #include <stdio.h> #include <stdlib.h> struct Node { void *data; … | |
I need to figure out how to append an int to a string, so basically i need to convert the int to a string 1st, but I cant figure out how. :rolleyes: any help would be greatly appreciated. thank you, courtney | |
`Inline Code Example Here` **how to run the c program on note pad shall any one give me answer** | |
![]() | What Can I do so as to stop compiler not to do padding in the structures ? is there any pragma or something like that which i can use ? thanks in advance. now, "ANY" response will be appreciated. :-D ![]() |
![]() | The publicity team for Technozion is in full swing. Like every year, this time too, the team is planning to visit N different colleges in India. This publicity campaign shall involve the members of the team giving presentations about Technozion. For the publicity trip, the team has decided to come … ![]() |
Dear All, I have a question about array which let me confused and I think it needs deep understanding of arrays. I would like to know why it is possible to use array of char as pointer without a fixed size and also without dynamically allocating memory for it and … | |
I've used malloc countless times, but as far as I know, reading and writing to memory that isn't expressly yours (which is in fact done by the malloc function) causes a segfault. If I wanted to make my own dynamic allocation functions my computer would probably just laugh at me … | |
Hello guys this is an amazing programming that converts entered digit into word.nut i need your help i am only able to do it upto 99. #include<stdio.h> #include<conio.h> void main() { int n,m,j; clrscr(); printf("Enter any number between 1 to 99 : "); scanf("%d",&n); printf("You entered "); if(n>0&&n<=10) goto one; … | |
please help me understanding the following program? int i= -1, j= 1, m; m= i++ && j++ || i++; printf("%d %d", i,m); | |
Can anyone explain the difference between * ptr++ and ++ *ptr ? To my understanding, * ptr++ increments the pointer and not the value pointed by it and ++ *ptr increments the value being pointed by it. Does the former mean incrementing the address of the pointer ? Please explain. … | |
plz help me to solve the error in this program : Given programs replaces multiple spaces with only one space... there is no error , but it shows "Segmentation Fault"...whats the issue ????????? #include<stdio.h> int main(void) { char *t="ALOK KUMAR ASHISH KUMAR ANKUSH"; char *c; int n1=0; while (*t) { … | |
int i=512; char *c=(char *)&i; c[0]=2; printf("%d",i); o/p is 514 ![]() | |
#include<conio.h> #include<stdio.h> void main() { int iRows; clrscr(); printf("Enter a number :"); scanf("%d",&iRows); if(iRows>0) { for(int iResult=0,iCount=0,iRows; iResult<=iRows; iResult++) for(iResult=1,iCount=0,iRows; iCount<=iResult; iCount++) printf("*"); printf("\n"); }//for getch(); }//main please help me to correct my source code: i should make a program like this: * ** *** **** ***** . . . … | |
I am looking to create a binary tree and then print it out. I am getting some strange errors I cant fix. #include <stdio.h> #include <string.h> struct animalTree { char data[100]; struct animalTree *left; struct animalTree *right; }; typedef struct animalTree aTree; void fillTree(FILE*, struct animalTree*); int readNext(char*, FILE*, int*); … | |
Hello everyone I'm having a bit of trouble with C. Its been awhile and I was wondering if I'm on the right track I'm trying to read from a file and manipulate the data with a structure I created. The problem is the first two values in the text document … | |
![]() | hi.... Let F be the matrix 1 1 1 0 Then F^n (2x2 matrix multiplication) equals F(n+1) F(n) F(n) F(n-1) because: (F(n+1) F(n) ) (1 1) = ( F(n+1)+F(n) F(n+1)) (F(n) F(n-1)) (1 0) = ( F(n)+F(n-1) F(n) ) Can anybody tell me or give me the hint that how … |
hello frends, i m havig a problem with the deletion of node int the tree plz help me to get my code debugged void delete_node(struct node *temp,int data) { struct node *temp2=NULL,*temp3; if(temp->data==data&&temp->left==NULL&&temp->right==NULL) { temp=NULL; } else { while(temp->data!=data) { printf("\n temp = %d",temp->data); temp2=temp; if(temp->data<data) { temp=temp->right; } else … | |
can anyone please help me out with creating simple screen editor using graphics functionality in c language. | |
![]() | float* values = calloc(m*n, sizeof(float)); float** rows = malloc(n*sizeof(float*)); for (int i=0; i<n; ++i) { rows[i] = values + i*m; } What is this code trying to so ? Can you explain me the first 2 lines in detail ? I am not getting it. thanks. |
Hi Geeks, i have declare Char *a type variable and i want to fill data in a[0][n], a[1][n], ... a[max][n]. below is my code snippet which i'm facing build error while initializing. I'm getting build error as ".....subscript requires array or pointer type " ......... char *a; a = (char*)calloc(3,sizeof(int)+3);//trying … | |
Hello I am getting error as **segmentation fault** when my file contains large number of line(approx. 44000. However if I run the same program with lesser number of lines, it works fine. I am not getting the reason for this error and how to rectify it. int main() { FILE … | |
Is writing a lot of functions in a program a good practice? | |
hi, i have seen somany people asking about fnding loops in a single linked list. i would like to know is there any advantange or necessity for having loops in a linked lists. is there any application that really requires loops in lists. Thanks, Gaiety | |
can anyone suggest me URL for chat application in c language? ![]() | |
I am developing a pos application with c language, What i am trying to achieve is to add, and delete users. Adding is not a problem at all. but deleting is becoming too tricky What i am doing is, i am seaching for the record using fread(), then as soon … | |
![]() | Hihi im very new to programming. Need help for this program. Im supposed to create a queue using an integer array. For input value > 0, program will insert value to queue ; input value = 0, program will remove least recently added value from queue if non empty ; … ![]() |
The End.