Page 20 - C++
P. 20

Num Calc(int X)
                     {

                            full=(X>2)?1:2;
                            return (full%2);      //; is missing

                      }

                     void main()
                     {

                            int full=1000;
                            full=Calc(::full);

                            cout<<::full<<”::”<<full<<endl;
                     }



                     (1/2 mark for every corrected line of code) Or
                     (1 Mark for only identifying any 4 errors without suggesting corrections)

               (d)   Write the output of the following C++ program code(assume all necessary header files           2

                     are included in program):




































               Ans  Output:
                     New Encrypted Message after Pass 1 is : Dpnqvufs3128

                     New Encrypted Message after Pass 2 is : Eqorwvgt4239



                                                         Page No. 3
   15   16   17   18   19   20   21   22   23   24   25