15,554 Topics

Member Avatar for
Member Avatar for samohtvii

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

Member Avatar for Ancient Dragon
0
202
Member Avatar for Abhineet.Ayan

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 …

Member Avatar for WaltP
0
211
Member Avatar for adrawat

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() { …

Member Avatar for adrawat
0
210
Member Avatar for corby

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; …

Member Avatar for WaltP
0
117
Member Avatar for cortiknee

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

Member Avatar for dverex
2
15K
Member Avatar for chandrasekhar p

`Inline Code Example Here` **how to run the c program on note pad shall any one give me answer**

Member Avatar for deceptikon
0
189
Member Avatar for I_m_rude

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

Member Avatar for I_m_rude
1
86
Member Avatar for I_m_rude

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 …

Member Avatar for I_m_rude
0
276
Member Avatar for Ahmed Sarwat

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 …

Member Avatar for WaltP
0
173
Member Avatar for Mahkoe

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 …

Member Avatar for WaltP
0
235
Member Avatar for murtazamzk

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; …

Member Avatar for soumava28
0
2K
Member Avatar for Swati_1

please help me understanding the following program? int i= -1, j= 1, m; m= i++ && j++ || i++; printf("%d %d", i,m);

Member Avatar for deceptikon
0
58
Member Avatar for rocky2008

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. …

Member Avatar for deceptikon
0
199
Member Avatar for Subodh11

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) { …

Member Avatar for Ancient Dragon
0
141
Member Avatar for shanki himanshu
Member Avatar for I_m_rude
0
239
Member Avatar for ronnel09

#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: * ** *** **** ***** . . . …

Member Avatar for deceptikon
0
129
Member Avatar for rahul pareek
Member Avatar for deceptikon
0
79
Member Avatar for samohtvii

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*); …

Member Avatar for deceptikon
0
269
Member Avatar for Prisms

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 …

Member Avatar for WaltP
0
408
Member Avatar for I_m_rude

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 …

Member Avatar for deceptikon
1
227
Member Avatar for abrarsyed

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 …

Member Avatar for Despairy
0
170
Member Avatar for chandnigandhi

can anyone please help me out with creating simple screen editor using graphics functionality in c language.

Member Avatar for zeroliken
0
102
Member Avatar for I_m_rude

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.

Member Avatar for deceptikon
0
144
Member Avatar for Perry31

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 …

Member Avatar for Perry31
0
180
Member Avatar for jigar23

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 …

Member Avatar for deceptikon
0
165
Member Avatar for billionair
Member Avatar for Gaiety

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

Member Avatar for rubberman
0
174
Member Avatar for chandnigandhi
Member Avatar for I_m_rude
0
217
Member Avatar for DizaFire

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 …

Member Avatar for VatooVatoo
0
156
Member Avatar for qwazy

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 ; …

Member Avatar for qwazy
0
2K

The End.