Q. What is the output the program?

Code:
int main()
{
	register a=80;
	auto int b;
	b=a;
	printf("%d ", a);
	printf("%d ", b);
	
	return -1;
}
  • (A) Compiler error. You can not assign register value to int variable.
  • (B) 80 80
  • (C) 80 0. Register value can not be copied.
  • (D) Compiles, but output is none.
πŸ’¬ Discuss
βœ… Correct Answer: (B) 80 80

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
286
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
83%
Success Rate