Skip to content

Assignment 2 (CPP introduction)

yahya tawil edited this page Oct 4, 2021 · 1 revision

Exercise 1

Convert letters from A to Z from capital letter to small letter. Start using the following code.

#include <iostream>

char captital_letters[]={/* your code here*/};

int main(){
    
    for(int i=0;/*your code here*/;i++)
      // your code here "cout<<...";

    return 0;
}

Exercise 2

Write a program to do 2D matrix multiplication. User should enter first the dimensions (through an error using assert if C1 != r2). Then user enters the values of each matrix.

Exercise 3

Let be var=0xDEAD0000 , using a pointer of type char* pointing to var. Change the value to 0xDEADBEAF.