

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
The cs 795 midterm exam for the spring 2005 semester. The exam covers various topics in computer science, including coding exercises, static and dynamic code analysis, control flow graphs, and aliasing. Students are required to complete the exam and submit it by a specified deadline.
What you will learn
Typology: Exams
1 / 2
This page cannot be seen from the preview
Don't miss anything!
/* 1 / / Sample code for slicing exercise. v. 2/21/05 / / 2 / #include <iostream.h> / 3 / void main() / 4 / { / 5 / const int reps=10; / 6 / int i; / 7 / int a, b, c, d; / 8 / cin >> a; / 9 / cin >> b; / 10 / / 11 / c = 2a + ab; / 12 / d = 3a + b; /* 13 / for ( i=0; i<= reps; i++ ) / 14 / { / 15 / if ( c < 0 ) / 16 / { / 17 / a = 2a; /* 18 / c = c+5; / 19 / } / 20 / else / 21 / { / 22 / c = 2a + ab; / 23 / d = 3a + b; /* 24 / } / 25 / } / 26 / cout << c << endl; / 27 */ }