Q. Choose a right statement.

  • (A) Variables of type auto are stored in Stack memory.
  • (B) Variable of type Static are stored in Segmented Memory.
  • (C) Variables of type register are stored in Micro Processor Memory.
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Q. Choose a right statement.

  • (A) Variables of type auto are initialized fresh for each block or function call.
  • (B) Variables of type static are initialized only first time the block or function is called.
  • (C) Variables of type register are initialized each time the block or function is executed.
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Q. What is the output of the program.?
#include<stdio.h>

Code:
int main()
{
	printf("Hello Boss.");
}
  • (A) Hello Boss.
  • (B) hello boss
  • (C) No output
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (D) Compiler error

Q. What is the output of the program?

Code:
int main()
{
	auto int a=10;
	{
		auto int a = 15;
		printf("%d ", a);
	}
	printf("%d ", a);
	return 1;
}
  • (A) 10 10
  • (B) 10 15
  • (C) 15 10
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (C) 15 10

Q. What is the output of the program?

Code:
int main()
{
	register a=10;
	{
		register a = 15;
		printf("%d ", a);
	}
	printf("%d ", a);
	
	return 20;
}
  • (A) 15 20
  • (B) 15 10
  • (C) 10 15
  • (D) 15 15
πŸ’¬ Discuss
βœ… Correct Answer: (B) 15 10

Q. What is the output of the C Program statement?

Code:
register int b;
prinf("%d", b);
  • (A) null
  • (B) 0
  • (C) random integer number
  • (D) random real number
πŸ’¬ Discuss
βœ… Correct Answer: (C) random integer number

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

Q. What is the output of the program.?

Code:
void myshow();

int main()
{
	myshow();
	myshow();
	myshow();
}

void myshow()
{
	static int k = 20;
	printf("%d ", k);
	k++;
}
  • (A) 20 20 20
  • (B) 20 21 21
  • (C) 20 21 22
  • (D) Compiler error.
πŸ’¬ Discuss
βœ… Correct Answer: (C) 20 21 22

Q. What is the output of the program.?
#include<stdio.h>

Code:
static int k;

int main()
{
	printf("%d", k);
	
	return 90;
}
  • (A) -1
  • (B) 0
  • (C) 90
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (B) 0

Q. Operator % in C Language is called.?

  • (A) Percentage Operator
  • (B) Quotient Operator
  • (C) Modulus
  • (D) Division
πŸ’¬ Discuss
βœ… Correct Answer: (C) Modulus