15 Topics

Member Avatar for
Member Avatar for Joemeister

I am trying to transform a infix mathematical expression into a postfix expression using the shunting yard algortihm but can only get so far by writing the pseudo code because I know exactly what to do through logical thinking but can't write the code that will help me do it. …

Member Avatar for iamthwee
0
598
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 Nirvin M

Why does the following snippet produces different result than expected? #include <stdio.h> int main() { int i = 5; printf("%d %d %d", i++, i++, ++i); getchar(); } I compiled and run this code with Visual C++ 2010 and it produces the output 7 6 8 instead of 7 6 6 …

Member Avatar for TrustyTony
0
179
Member Avatar for while(!success)

Hey guys, I need help recognizing multiple digit numbers that are read so that I may push said number into a stack for future evaluation For example: 22 3 + should evaluate to 25 When I input 22 3 +, my output is evaluated to 5 Any help/criticism is welcome …

Member Avatar for WaltP
0
2K
Member Avatar for Esmerelda
Member Avatar for Labdabeta

I have an alpha beta interface and have implemented a tic tac toe class from it. For some reason my AI tends to occasionally make stupid moves (such as making a fork rather than blocking a 2 in a row) I was wondering if anybody can see where I went …

Member Avatar for Labdabeta
0
1K
Member Avatar for Hazkhan

I want to build a program for my c language project.What i need to do is that the user should enter the number of students,number of questions,correct answers,each students answers answers and then the program should calculate the number of correct answers,and their standing,the most wronged question . the problem …

Member Avatar for adityatandon
0
2K
Member Avatar for java_stud

i'm having a problem with my code for evaluating postfix expressions. any comments on what's wrong on my code? [code] import java.io.*; import java.util.*; import java.util.Stack; public class Eval { private Stack<String> operatorStack; private Stack<Integer> operandStack; public int evaluate(String output) { StringTokenizer s = new StringTokenizer(output);//divides into tokens int value; …

Member Avatar for ~s.o.s~
0
217
Member Avatar for selasedaniweb

I have performed heuristic evaluation on the following web site "http://www.ghanaairports.com.gh/" and identified a couple of problems. Am supposed to submit this as part of my assignment and want to validate my findings and improve my findings should there be a criteria am missing. Id be very grateful if respondents …

Member Avatar for Ezzaral
0
109
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 daino

Hi I'm rather new to C++ and am rather confused about something. I noticed, say, in an "if else" statement or a "Switch" statement it only evaluates numerical expressions. In an If Else statement I can compare two strings by using a returned boolean result from say 'strcmp' but I …

Member Avatar for Stefano Mtangoo
0
229
Member Avatar for aldm

Hi to all, I'm solving some numerical analiyse problems in C#. Is there any C# implemented function similar to eval() in Matlab? So, user type the function that he wants to evaluate in text box, and eval(String s, double x) evaluate value of that function with argument x. For example, …

Member Avatar for aldm
0
586
Member Avatar for jb1ker

Hi fellow designers and affiliates. I'm really struggling to [B]make my customer understand a few basic things about web design[/B]. I'm not perfect myself but I have been doing this for quite some years. However, the company currently has its website done by a [I]friend of the family[/I]. The marketing …

Member Avatar for jb1ker
0
158
Member Avatar for RebeccaGill

Remember Swiss-born psychiatrist Elizabeth Kubler-Ross and her book on death and dying? She outlined the five stages of grief a person goes through when dying. I read something recently about the fight to save a legacy system and it reminded me of this very book I read well over a …

Member Avatar for RebeccaGill
0
178
Member Avatar for Salem

This is a catalogue of some experiments on just two aspects of undefined behaviour. This was inspired by yet another long bout of explanation in a recent thread, so I thought it was time to dust off a bunch of compilers, and compare. This is the test code. [code] #include …

Member Avatar for frk
4
578

The End.