Posts

Advanced c programming chapter 1 questions and answers

Advanced c programming chapter 1 questions and answers   QA Review Questions 1.write a short note on c preprocessor. =>A preprocessor is a program that process or analyse the source code file before it is given to the compiler . it perform sum action according to  special instruction called preprocessor directives(which begin with #) in the source code. A preprocessor or directive begin with hash and does not end with semicon. 2. Explain macro substitution in brief with example. => The macro substitution directive is  #define. it defines the symbol which represent a value . Whenever the macro name occurs in a program the preprocessor substitutes the code of the macro at  that position. it defines symbolic constants with occur frequently in a program. Syntax  #define macro _name value Examples  1 #define PI 3.142 2#define TRUE 1 3 #define AND && 4 # define LESSTHAN  <  5 #define GREET prints ("Hello"); 6#define MESSAGE "welcom...

Chapter 1 problem solving concept question and answer

  Q1. State the requirements for problem solving by computer.  Ans. To solve problems encountered in our daily lives, we use several algorithms. We do this automatically without thinking about complexity of the problem or the solution. Consider a situation where you have to reach collage and your vehicle tyre gets punctured. In your mind, you think about several option walking, taking  the bus or train, calling up your friend etc. and evalute this option before making a choice. However, if the same task of choosing an option is to be given to a computer, the solution must be specified with a lot of detail and precision because the computer is not intelligent. It cannot analyz the problem, develop the procedure  for solving the problem, and then tell the computer carry out the instructions. Hence there are two important requirments for solving problem using computer: 1.Depth of understanding.  Disigning effective computer algorithms require s a great depth of und...