Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
60% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
Ranked #107.40K
~2K People Reached
Favorite Forums
Favorite Tags
Member Avatar for satish_dukkipat

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

Member Avatar for deceptikon
0
220
Member Avatar for aasi007onfire

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 …

Member Avatar for deceptikon
0
273
Member Avatar for Chinjoo

[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:"); …

Member Avatar for yash00yash
0
476
Member Avatar for daudiam

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

Member Avatar for daudiam
0
238
Member Avatar for theo19

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

Member Avatar for ejosiah
0
127
Member Avatar for compubaba

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 …

Member Avatar for Salem
0
160
Member Avatar for sumeetdesaeee

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 …

Member Avatar for Dream2code
0
200
Member Avatar for tones1986

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 …

Member Avatar for Murtan
0
153
Member Avatar for findlay

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 …

Member Avatar for Salem
0
145
Member Avatar for USUAggie

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 …

Member Avatar for Duoas
0
226
Member Avatar for harshchandra

Can anyone tell me the complete algorithm analysis of Tower of Hanoi for n pegs and n disks.I really need it :sad:

Member Avatar for harshchandra
0
255