Tuesday 25 April 2017

Function Pointer



   Function pointer is a type of pointer which points a function or code block. You can assign address of a function to function pointer variable and that function using function pointer variable name.


   I have a bad experience while making Calculator. In my design all the calculation takes place when user pressed equal button. When a user pressed equal button I need to check every time which operator user was pressed , checked by switch case, it become complicated then I increase more function in my calculator because of lots condition for operator check and attached code for particular logic separately.


   Now my work becomes simple because of function pointer because I just need to check operator pressed by user and attached related function code to function pointer. It reduces lots of condition checking and assigns separate code to each section. So function pointer is very useful in some specific scenario.


Advantage of function pointer

  • Implement Callback
  • Useful in event handling
  • One entry point for more than one code block

Monday 24 April 2017

C language function precedence


Question :


Which of the following is the correct order if calling functions in the below code?a = f1(23, 14) * f2(12/4) + f3();

A) f1, f2, f3
B) f3, f2, f1
C) Order may vary from compiler to compiler
D) None of the above

NIELIT O Level C Language Solve Paper July-15

NIELIT O Level C Language Solve Paper with Answer July-15

1 Objective

1.1 A
Explanation : See operator priority table 
1.2: A
1.3 : C
Explanation : Continue statement transfer control to start of loop and when condition will be wrong else stops loop So string will be printed 0 times because its after else statement.

Sunday 23 April 2017

Microsoft Word Mail Merge

Microsoft Word Mail Merge

Microsoft Word Mail Merge Tutorial in Hindi

Microsoft word has mail merge feature which enable you to make a letter to a huge number of people in an efficient way. Without using mail merge its very