BEST代写-线上编程学术专家

Best代写-最专业靠谱代写IT | CS | 留学生作业 | 编程代写Java | Python |C/C++ | PHP | Matlab | Assignment Project Homework代写

C语言代写 | EL-GY 6483 Test

C语言代写 | EL-GY 6483 Test

本次美国代写是C语言嵌入式开发系统的一个限时测试

1. Using the variable x, give definitions for the following:

(a) An integer
(b) A pointer to an integer
(c) An array of 10 integers
(d) An array of 10 pointers to integers

2. What is the output of the following C program?

#include <stdio.h>
int main ()
{
int vals[5] = {4, 3, 2, 5, 1};
int i;
for (i=0; i<=5; i++) {
printf(“vals[%d]=%d\n”, i, vals[i]);
}
return 0;
}

3. (a) What is the output of the following C program?

# include <stdio.h>
void fun(int y)
{
y = 30;
}
int main()
{
int y = 20;
fun(y);
printf(“%d”, y);
return 0;
}

(b) In the program above, is the variable y in main() stored on the stack or on the heap?

(c) What is the output of this C program?

# include <stdio.h>
void fun(int *y)
{
*y = 30;
}
int main()
{
int y = 20;
fun(&y);
printf(“%d”, y);
return 0;
}

(d) In the program above, is the variable y in main() stored on the stack or on the heap?

(e) True or false: &y in main() and y in fun() have the same value.

bestdaixie

评论已关闭。