Introduction to C/C++

 

Home
Introduction to C/C++
C Advanced Programming
Introduction to Comp. Comm.
Data Structures for MIS
Introduction to Microecon.
Micro A
Micro C
Pre-Academic Economics

 

Exercises Submission:

Exercise Booklet       Exercise Front Page

bulletFinal Exams
bullet2007 semester A moed A
bullet2007 semester A moed B
bullet2008 semester A moed A
bullet2008 semester A moed B
bullet2009 semester A moed A
bullet2009 semester A moed B
bullet 2010 semester A moed A   Solution
bullet 2010 semester A moed B   Solution
bullet 2011 semester A moed A   Solution
bullet 2011 semester A moed B   Solution
bullet 2012 semester A moed A   Solution
bullet 2012 semester A moed B   Solution
bullet 2013 semester A moed A   Solution
bullet 2013 semester A moed B   Solution
bulletMidterms
bullet2011 Example of Midterm Exam
bullet 2011 Midterm Exam
bullet 2012 Midterm Exam
bullet 2013 Midterm Exam

Sections:

Below you can find all the programs which were presented during the Tirgulim.

You may download, compile and execute on your own discretion.

bulletTirgul 1
bulletVisual Studio 2010 Introduction.
bulletA well documented program example. Click here
bulletMy first program - add 2 numbers. With output examples. Click here
bulletTirgul 2
bulletVariables, bases and 2's complement.
bulletDebugger.
bulletMultiply 2 numbers where the second is a real number inputted as an integer and two separate digits. Click here
bulletSum the digits of a 4-digit real number. Click here (notice that there is a much simpler solution but the provided solution is for educational purposes).
bulletGet a character and print it and its ASCII value. Click here
bulletOne-digit numbers multiplication (using chars as variables). Click here
bulletTirgul 3
bulletGet a number and print if it is positive, negative or zero. Click here
bulletGet a character and print its type (using cin.get()). Click here
bulletGet numbers until -1 and print the minimum and the maximum. Click here
bulletPrint a triangle of stars according to an input number. Click here
bulletPrint a triangle of capital letters according to an input capital letter. Click here
bulletPrint a pyramid of numbers according to an input number. Click here
bulletPrint a butterfly of lower case letters according to an input letter. Click here
bulletTirgul 4
bulletQuestion 7 in loops.
bulletTirgul 5 (Functions - By Value and By Reference)
bulletGet an index and return the Fibonacci number. Click here
bulletGet an index and return the element according to a given equation. Click here
bulletGet a number and return true if its digits form an algebric series. Click here
bulletMerge 2 numbers (see comments for further details). Click here
bulletReverse a number - implemented in the above program.
bulletGet a number and return the reversed number and a number without the even digits. Click here
bulletTirgul 6 (Recursions)
bulletQuestions 1-4 from the booklet.
bulletTirgul 7 (Recursions & Functions - By Reference)
bulletGet a number and return its max digit and min digit.
bulletIterative solution. Click here
bulletRecursive solution Click here
bulletGet a number and return the sum of the digits placed at even places and the sum of the digits placed at odd ones.
bulletIterative solution. Click here
bulletRecursive solution Click here
bulletGet a number and return the digit which appears the most and its number of appearances.
bulletIterative solution
bulletInefficient version (n^2). Click here
bulletEfficient version (n). Click here
bulletRecursive solution Click here
bulletTirgul 8
bulletFind the minimum and maximum in an array of integers. Click here
bulletSemi sort array of integers - negatives first, positives and zeros after.
bulletUsing the Left-Right pattern. Click here
bulletUsing the Read-Write pattern. Click here
bulletFind if a sorted array contains opposite numbers (numbers which their sum is zero). Click here
bulletTirgul 9
bulletReturn the last word of an input string. Click here
bulletPrint the digits of an input number in an increasing order. Click here
bullet

"Large numbers arithmetic" - add and multiply numbers which are represented in an array as follows - the first digit (units) is stored in the first place of the array (index 0), the second digit (dozens) at the second place (index 1) etc'. Click here

bulletTirgul 10
bullet

Lexicografic sort of a 2D array of chars. Each row represent an input line and the algorithm sorts the lines. Click here

bullet

Sum the 4 k-length corner diagonals of a 2D array. Click here

bullet

Check if all the rows of a 2D array are strictly Up-Down series. The implementation uses a function that checks if a 1D array is a strictly Up-Down series. Click here

bulletTirgul 11
bullet

Strings questions.
bullet

Solution. Click here

bulletTirgul 12
bullet

Struct questions from the booklet.

 

 
     

Home | Introduction to C/C++ | C Advanced Programming | Introduction to Comp. Comm. | Data Structures for MIS | Introduction to Microecon. | Micro A | Micro C | Pre-Academic Economics