3 like 0 dislike
75 views

#include <stdio.h>

int main()

{

int *ptr1, *ptr2, i = 10, j = 20;

ptr1 = &i;

*ptr1 = 15;

ptr2 = &j;

*ptr2 = 5;

ptr2 = ptr1;

*ptr2 = 25;

ptr2 = &j;

*ptr2 += *ptr1;

 printf("Val = %d\n", j);

return 0;

}

 

References: C From Theory

[Normal] Essay (Open question) - asked in Introduction to Computer Programming I (C) by (20.9k points)
ID: 21929 - Available when: Unlimited - Due to: Unlimited
| 75 views
Welcome to Peer-Interaction Programming Learning System (PIPLS) LTLab, National DongHwa University
English 中文 Tiếng Việt
IP:172.69.6.167
©2016-2024

Related questions

5 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21975 - Available when: Unlimited - Due to: Unlimited
| 153 views
5 like 0 dislike
1 answer
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21973 - Available when: Unlimited - Due to: Unlimited
| 189 views
5 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21972 - Available when: Unlimited - Due to: Unlimited
| 147 views
4 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21966 - Available when: Unlimited - Due to: Unlimited
| 125 views
4 like 0 dislike
0 answers
[Normal] Essay (Open question) - asked Feb 19, 2017 in Introduction to Computer Programming I (C) by The Contributor (20.9k points)
ID: 21964 - Available when: Unlimited - Due to: Unlimited
| 135 views
12,783 questions
183,443 answers
172,219 comments
4,824 users