@ Ahmed....sorry, but the program is running without the line as well....in my pc... Maybe we are using different type of compilers... please...
Hello....I have used an initialisation in it as well....alike Shabbir used in Doubly or Circular linkd list... Here's my code......
In my compiler it is showing.... General Protection Exception MYSTACK.C 46 MYSTACK(2) 0x23E7:0x00D0 Processor Fault Can anyone tell me...
Is there any post or article on circular array????
I have counted them as well...that's what was confusing me...
I have seen your post in the other thread Sir.... So what I have to do is.... void display(node **top) { node *t=*top;...
I see...now I get that point...thanks sir...
Excuse me....but in my compiler it is showing for the first display... 2 1 but further progress, such as the msg "Do you want to...
foo+=n; and num=num+n; both are same declarations....at least according to my compiler, for the results remain the same, it is updating the local...
Certainly, the stack will be 1,2,3,4,5. But As I have presented it in the form of a function, whenever it is getting called, it is traversing the...
I was trying to increase the value of a variable within a loop according to my own wish... e.g. initially the variable value is declared 0. Now...
Sorry....the moment I saw the thread, I went for trying it, without reading it completely....I have no intention to hijack someone's thread, not...
But xpi0t0s, the sum beginning with 1 can also be with repeatations, I mean; 1+1+1+1+1+1+1+1+1+1+1+1+1+1+1=15 isn't it??
Exactly....I am trying....and trying....and trying.... Just because my sem is near, I am not being able to concentrate fully...
Yes....that's right.... But for higher sum representation, what will be the expression?? I mean say we want to print this sum...
Since now top -> NULL, according to our push function, any node further inserted will be assigned to top....for example, if we enter the no. 5...
One more thing.....the last program is not void of showing repeated results, e.g. it is showing 1+1+8=10 and 1+8+1=10 and 8+1+1=10 all three....I...
Right now I worked it out for three nos. as well....but for n nos. the printing statement is troubling me....I think it'll need more time.......
For expressing it as the sum of two numbers, I found it easey...but for greater than 2, I think I need to work out further.......
But xpi0t0s, each time the pointer top moves to the next node as we move down the stack Like this: Say initially my stack was 1 <- top...
Separate names with a comma.