Course Content
Programming in C
About Lesson
  1. Write a function strrindex(s, t), which returns the position of rightmost occurrence of string t in string s, or -1 if there is none.
  2. Write a function atof(s), that converts string s to its equivalent floating point value and returns the float. The function should be able to handle scientific notations (numbers containing e or E) like 123.5e-7.
  3. Write a program to convert an infix expression to a postfix expression. A infix expression is of the form: (1 + 2) * (3 + 4). Its equivalent postfix expression is 1 2 + 3 4 + *.
  4. Write a function eval_postfix(s), that takes a postfix expression string as its argument, evaluates it and returns the value.
  5. Implement a Queue data structure, which has enqueue and dequeue functions to add value to the end of the queue and remove a value from the beginning of the queue.
  6. Define a macro swap(t, x, y) that interchanges two argument x and y, of type t.
Scroll to Top