Sunday, November 20, 2011

CBSE NCERT SOLUTIONS Class XI English

CBSE NCERT SOLUTIONS Class XI English

3 comments:

  1. what is the difference between type casting and automatic type conversion? also give a suitable c++ code to illustrate both.

    ReplyDelete
    Replies
    1. Type casting simply means converting the data type of any variable manually, for e.g.- if we have an in t variable 'a' storing '99' in it and we want to convert that stored value to 'char' type for any use, we can do it using 'typecasting', the following program code illustrates it:

      #include
      #include //for using getch and clrscr

      void main()
      {
      clrscr();
      int a=99;
      cout<<"the value of "<<(char)a<<"in int or ASCII is "<
      #include

      void main()
      {clrscr();
      int a=10;float b=12.5,c=0;
      c=a+b; // here a is upgraded to float i.e 10.0 and
      // then operation is done,after that value is returned
      // as float as 'c' is of float data type

      cout<<"Value calculated is "<<c<<endl;
      getch();
      }

      Delete
  2. Due to some limitations of blog the answer wasn't posted all acurate
    so you can download the above comment as here

    http://www.ziddu.com/download/19290735/Comment_Reply01.txt.html

    ReplyDelete

If you have any query,suggestion,request or complaint(if any),
Please Comment here and let me know. And Do not Abuse here
Thanks & don't forget to hit '+1'.

Note: Only a member of this blog may post a comment.