Q:

What is the value of j in the following program

0

What is the value of j in the following program

int i = 42;
int main()
{
int i = 100;
int j = i;
}

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <iostream>

int i = 42;
int main() {
  int i = 100;
  int j = i;  // 100
  std::cout << j << std::endl;

  return 0;
}

 

Output:

100

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now