Question: What exactly is occuring in memory if I run the following programs? Will they crash or will they execute successfully? A. int main( int argc,
What exactly is occuring in memory if I run the following programs? Will they crash or will they execute successfully?
A.
int main( int argc, char *argv[])
{
char myArr[40];
strcpy(buffer,argv[1]);
}
B.
int main(int argc, char *argv[])
{
char * myChar =Testing 123;
char myArray[10];
for ( int i =0; i< 2000; i++)
{
myArray[i]= $;
}
char test = myChar[0];
}
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
