Q. Determine Output

Code:
#define int char
void main()
{
      int i = 65;
      printf("sizeof(i)=%d", sizeof(i));
}
  • (A) sizeof(i)=2
  • (B) sizeof(i)=1
  • (C) Compiler Error
  • (D) None of These
πŸ’¬ Discuss
βœ… Correct Answer: (B) sizeof(i)=1
Explanation: Since the #define replaces the string int by the macro char.
Explanation by: Prashant
Since the #define replaces the string int by the macro char.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
203
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Prashant
Publisher
πŸ“ˆ
80%
Success Rate