Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you try and explain why you get the answers you do, and can you show your steps. Thankyou. Consider the following pseudo-code (not any

image text in transcribed

Can you try and explain why you get the answers you do, and can you show your steps. Thankyou.

Consider the following pseudo-code (not any specific language): I/ GLOBAL variables int num[10] ={0,0,0,0,0,0,0,0,0,0};// Subscripts start at 0 as in C++ int index =1; void somefun(int alpha, int beta) \{ alpha =7; num [ index] =33; index = index 6; num[alpha] =44; beta =55; \} void main() \{ somefun( index, num[index +4] ); // Function Call \} Note that array subscripts start at 0 as in C++. Indicate the following values after the execution of somefun(): - 4a. If all the parameters are passed by Reference: - Final value of index: - All (if any) changes in the elements of num: - 4b. If all the parameters are passed by Value Result: - Final value of index: - All (if any) changes in the elements of num

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 9 For Linux UNIX And Windows Advanced Database Administration Certification Certification Study Guide

Authors: Roger E. Sanders, Dwaine R Snow

1st Edition

1583470808, 978-1583470800

More Books

Students also viewed these Databases questions