notes3

notes3 - HelpforLAB01 stringcomparison strcmp(s1,s2)=0...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Help for LAB01 string comparison strcmp (s1, s2) == 0             if s1 and s2 are the same if (strcmp(word, "+")) {             double b = pop();             double a = pop();             push (a+b); }     Implement void push (double val) { . . . } double pop() { . . . } # define MAX STK 20                              double stack[MAX STK]; int top;     2 5             top = 0 1  2     5               2           +                                                                                                      push()         push() b = pop()   2                                                             a = pop()   5                                                             push(a+b)   printf (format, v1, v2); scanf (format, &v1, &v2);   Format modifiers %d = decimal signs %ld = long decimal signs %u = unsigned decimal %p = unsigned octal
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

notes3 - HelpforLAB01 stringcomparison strcmp(s1,s2)=0...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online