Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. operations in the cout<<

operations in the cout<<

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ahmed Ismail Mohamed
    wrote on last edited by
    #1

    int x = 4; cout<< x+3; i want to know what is the type of variable holds the expression x+3 in the cout statement. ****************** ****************** ** Ahmed Ismail ** ****************** ******************

    T A M 3 Replies Last reply
    0
    • A Ahmed Ismail Mohamed

      int x = 4; cout<< x+3; i want to know what is the type of variable holds the expression x+3 in the cout statement. ****************** ****************** ** Ahmed Ismail ** ****************** ******************

      T Offline
      T Offline
      toxcct
      wrote on last edited by
      #2

      as both operands of the operator + are integers, the resulting variable is also an integer...


      TOXCCT >>> GEII power

      [VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

      1 Reply Last reply
      0
      • A Ahmed Ismail Mohamed

        int x = 4; cout<< x+3; i want to know what is the type of variable holds the expression x+3 in the cout statement. ****************** ****************** ** Ahmed Ismail ** ****************** ******************

        A Offline
        A Offline
        ahmed mega
        wrote on last edited by
        #3

        I think that it's atemporary variable which made in the run time from the type int to hold the output then it will be destroyed.

        1 Reply Last reply
        0
        • A Ahmed Ismail Mohamed

          int x = 4; cout<< x+3; i want to know what is the type of variable holds the expression x+3 in the cout statement. ****************** ****************** ** Ahmed Ismail ** ****************** ******************

          M Offline
          M Offline
          MIAN KAMRAN
          wrote on last edited by
          #4

          it should be int but it is Compiler to decide wrt its Type Expressions

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups