- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
Re:
int i,j=4; i=j++*++j*j--; what is the result of i and how it is evaluated please help me. the result is 125 and i don't understand the evaluation part |
|
Re:
in our college we have a repeated C aptitude question... which goes like this.... [code] int i=5 printf("%d %d %d", i--,i,i++) [/code] and the answer given to us was 5,6,5.... when asked it was said that the compiler evaluates printf from right to left...... can somebody throw some light on … |
|
Re:
[CODE]#include<stdio.h> #include<conio.h> #include<math.h> void hanoi(int x, char from,char to,char aux) { if(x==1) { printf("Move Disk From %c to %c\n",from,to); } else { hanoi(x-1,from,aux,to); printf("Move Disk From %c to %c\n",from,to); hanoi(x-1,aux,to,from); } } void main() { int disk; int moves; clrscr(); printf("Enter the number of disks you want to play with:"); … |
|
Re:
b=c/d++; In this, first d is incremented (because ++ has a higher priority than / or =), but c is divided by the unincremented value of d. Thus, the order of evaluation in this case is well-defined. But if we had written the above as: b=(c)/(d++) then which operand ( … |
|
Re:
[CODE] import java.awt.*; import java.applet.*; import java.util.*; public class Tower extends Applet { TowerPanel panel; TowerControl control; public void init() { resize(500,450); setLayout(new BorderLayout()); panel = new TowerPanel(); add("Center", panel); add("South", control = new TowerControl(panel)); } public void start() { panel.start(); } public void stop() { panel.stop(); } public boolean … |
|
Re:
What exactly is meant of by associativity(right to left / left to right) mentioned on p53 of K&R 2nd edition. The book mentions that in X= f() + g() f may be evaluated before g or vice versa . But in the table it has been mentioned that () has … |
|
Re:
I recently appeared for the entrance of cdac. There I found a lot of questions about postfix.(I know the postfix operator commonly used in c.But it wasn't that way.) Sample question:- Wat will the expression ABC AB AC will become after postfix operation?? Please tell me how to deal with … |
|
Re:
hi all. in a recent project i created a linked list to store a students course data...such as course ID, year taken, semester taken, and final grade. This program worked without any problems. now, my next project is to create a stack to store the data, instead of a linked … |
|
Re:
Hi all, I have encountered a peculiar problem when performing some simple arithmetic in a program I am developing. As the function of the program is pretty specific to my field I have included a smaller program which illustrates the same problem without the technicalities. Given a function (in the … |
|
Re:
So I have figured out everything with this program, except one thing which is escaping me. I have created a General Tree(or sometimes called left most tree) where the node points to its left most child, and the child points to its right sibling and also its leftmost child. Creating … |
|
Re:
Can anyone tell me the complete algorithm analysis of Tower of Hanoi for n pegs and n disks.I really need it :sad: |