15 Topics
|
|
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. … |
|
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 … |
|
|
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 … |
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 … |
|
[code]main() { int a=5; a=++a + ++a; printf("%d",a); }[/code] the output is 14..how come? |
|
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 … |
|
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 … |
|
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; … |
|
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 … |
|
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 ( … |
|
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 … |
|
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, … |
|
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 … |
|
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 … |
|
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 … |
The End.