[c/c++]数组名和指针的区别

/ 5,620评论 / 24613阅读 / 0点赞
#include <iostream>
using namespace std;

int main()
{
	int i = 0;
	int* i_p = &i;
	int arr[10] = {};

	cout << "&i:   " << &i   << endl;
	cout << "i_p:  " << i_p  << endl;
	cout << "&i_p: " << &i_p << endl;
	cout << "arr:  " << arr  << endl;
	cout << "&arr: " << &arr << endl;
	cout << "sizeof(int):  " << sizeof(int) << endl;
	cout << "sizeof(int*): " << sizeof(int*) << endl;
	cout << "sizeof(i_p):  " << sizeof(i_p) << endl;
	cout << "sizeof(arr):  " << sizeof(arr) << endl;
	return 0;
}
  1. Lazrfvr说道:

    Здравствуйте!
    Приобрести диплом любого ВУЗа.
    lada-clubs.ru/gallery/image/733-kak-podobrat-proverennyy-magazin-s-bolshim-vyborom-diplomov/

  2. washi tape说道:

    Hello there! I just would like to give you a big thumbs up for the great info you’ve got right here on this post. I am returning to your blog for more soon.

  3. Trefwzc说道:

    Привет, друзья!
    Полезная информация как купить диплом о высшем образовании без рисков
    muktipotro.com/22141
    Всегда вам поможем!.

  4. sex说道:

    I’m very pleased to find this great site. I wanted to thank you for ones time for this fantastic read!! I definitely savored every part of it and I have you bookmarked to see new information in your blog.

  5. DanielGag说道:

    Останні новини світу https://uamc.com.ua про Україну від порталу новин Ukraine Today

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注