Question: Suppose the following C code is compiled and run on the visual studio ( for Question 1 1 , 1 2 and 1 3 )

Suppose the following C code is compiled and run on the visual studio (for Question 11,12 and 13)
1. int main(){
2. int i;
3. int five_ints[5];
4. char* c;
5.
6. for (i =0; i <5; i++) five_ints[i]=4;
7.
8. c =(char*)five_ints;
9. for (i =0; i <5; i++) c[i]=1;
10.
11. printf("%x
", five_ints[2]);
12.}
What does it print out? (The %x in printf is used to print out a word in hex format)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!