πŸ“Š C Programming
Q. What is the output of a C Program with functions and pointers.?
Code:
void texas(int *,int *);
int main()
{
    int a=11, b=22;
    printf("Before=%d %d, ", a, b);
    texas(&a, &b);
    printf("After=%d %d", a, b);
    
    return 0;
}
void texas(int *i, int *j)
{
    *i = 55;
    *j = 65;
}
  • (A) Before=11 22, After=11 22
  • (B) Before=11 22, After=55 65
  • (C) Before=11 22, After=0 0
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (B) Before=11 22, After=55 65

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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