πŸ“Š C Programming
Q. What is the output of C Program with pointers.?
Code:
int main()
{
    int a = 4;
    int *p;
    p=&a;
    while(*p > 0)
    {
        printf("%d ", *p);
        (*p)--;
    }
    return 0;
}
  • (A) 0 0 0 0
  • (B) 4 4 4 4
  • (C) 4 3 2 1
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (C) 4 3 2 1

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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