๐ Stressing over that assignment? Yeah, we get it.
Look, we've all been there deadlines creeping up, exams around the corner, and zero motivation to format another reference page. ๐ฎโ๐จ
So here's the deal: we'll take that assignment off your plate while you go crush your finals. ๐ฏ
โจ What you get:
ยท โ Proper academic formatting that actually looks legit
ยท โ A clean, ready-to-submit document
ยท โ No stress, no all-nighters, no last-minute panic
๐ก The move is simple stop staring at a blank screen and start focusing on what's actually gonna boost your grades. Let us handle the busy work, you handle the big stuff. ๐ง ๐
๐ฒ DM @TechnerdGuy
@ProgrammingWithFaith2018
Look, we've all been there deadlines creeping up, exams around the corner, and zero motivation to format another reference page. ๐ฎโ๐จ
So here's the deal: we'll take that assignment off your plate while you go crush your finals. ๐ฏ
โจ What you get:
ยท โ Proper academic formatting that actually looks legit
ยท โ A clean, ready-to-submit document
ยท โ No stress, no all-nighters, no last-minute panic
๐ก The move is simple stop staring at a blank screen and start focusing on what's actually gonna boost your grades. Let us handle the busy work, you handle the big stuff. ๐ง ๐
๐ฒ DM @TechnerdGuy
@ProgrammingWithFaith2018
โค2
แตแตแแแแก 50000 BTTC แญแฐแฃแนแแ แจแ แ แแแ แ Sign In แจแแตแแ แแตแฅ แแฅแณแน 20000 BTTC แญแฐแฃแนแแ แ แ แแแญ แแแ แณแตแฐแฉ 70000 BTTC แญแฐแฃแนแแ แจแ Withdraw แแตแจแ แแ fam
๐แแแแแญ๐
https://bttcweb.com/pages/register/register?code=7574712
๐แแแแแญ๐
https://bttcweb.com/pages/register/register?code=7574712
โค1
C++ Basic 2018 (Batch-2)
แตแตแแแแก 50000 BTTC แญแฐแฃแนแแ แจแ แ แแแ แ Sign In แจแแตแแ แแตแฅ แแฅแณแน 20000 BTTC แญแฐแฃแนแแ แ แ แแแญ แแแ แณแตแฐแฉ 70000 BTTC แญแฐแฃแนแแ แจแ Withdraw แแตแจแ แแ fam ๐แแแแแญ๐ https://bttcweb.com/pages/register/register?code=7574712
Guys, it's 100% legit. ๐ซก Here is the withdrawal proof. You can easily make money online, so I've included the link here. ๐ฐ Register and sign in, and you will receive 70,000 BTTC. ๐ช
Link : https://bttcweb.com/pages/register/register?code=7574712 ๐
Link : https://bttcweb.com/pages/register/register?code=7574712 ๐
โค2
C++ Basic 2018 (Batch-2)
Final exam 2023_2.pdf
โ
Answer ๐
PART I โ True or False
1. "If a condition is false, its statement executes and terminates the chain"
Explanation: When a condition is false, its body is skipped, not executed.
โ Answer: FALSE
2. "A function cannot be defined inside another function"
Explanation: In C++, you strictly cannot write a function inside another function. แ C++ แแตแฅ แ แแต function แแตแฅ แแ function แแปแ แ แญแปแแแข แญแ แจ C++ แฅแฅแ rule แแแข
โ Answer: TRUE
3. Does
Explanation:
โ Answer: TRUE
4. Can both
Explanation: Yes โ this is function overloading. Same name, different parameters = allowed.
โ Answer: TRUE
5. Is
Explanation:
โ Answer: FALSE
PART II โ Multiple Choice
Q1. Which array declaration is NOT correct?
Explanation: Arrays must be initialized with curly braces
โ Answer: C
Q2. Which is NOT true?
Explanation: Option B says "when condition is false, the if body executes" โ that is completely wrong. When false, the else body runs.
โ Answer: B
Q3. Statement for alternate paths based on condition?
Explanation:
โ Answer: A
Q4. Which is TRUE about arrays?
Explanation: Array size must be decided at compile time โ you can't change it while the program runs.
โ Answer: C
Q6. Correct variable name?
Explanation: Variable names can only have letters, digits, and underscore
โ Answer: B
Q7. Output of
Explanation: Counting from index 0: H(0) e(1) l(2) l(3) o(4) space(5) โ space is at index 5.
โ Answer: C โ Space
Q8. Output of
Explanation:
โ Answer: C โ -80
Q9. Pointer program output?
Explanation:
โ Answer: C โ Error
Q10. Output of const program?
Explanation:
โ Answer: D โ Error
Q11. How many times is "CppBuzz.com" printed?
Explanation: i goes from 0 to 4 (when i=5, condition
โ Answer: B โ 5 times
Q12. Output of a++, b, c?
Explanation:
โ Answer: A โ 111011
Q13. Variable declared inside a function?
Explanation: A variable declared inside a function only exists within that function โ called a local variable.
โ Answer: B โ Local variable
Q14. Output of car() program?
Explanation: car() is called once in main โ prints "Audi R8" once.
โ Answer: A โ Audi R8
Q15. Output of fun(x, y)?
Explanation: fun uses pass by value โ it receives copies. Changing x and y inside fun does NOT affect the originals in main. So y stays 20.
โ Answer: B โ 20
PART III โ Short Answers
Q1. Declaration of x pointed to by Ptr:
Explanation: To declare a pointer to an integer variable:
int x;
int *Ptr = &x;
Q2. Pass by Value vs Pass by Reference:
Explanation :
Pass by Value -A copy is sent to the function and Original is NOT changed
Pass by Reference-The actual variable is sent using & and Original IS changed
@ProgrammingWithFaith2018
PART I โ True or False
1. "If a condition is false, its statement executes and terminates the chain"
Explanation: When a condition is false, its body is skipped, not executed.
โ Answer: FALSE
2. "A function cannot be defined inside another function"
Explanation: In C++, you strictly cannot write a function inside another function. แ C++ แแตแฅ แ แแต function แแตแฅ แแ function แแปแ แ แญแปแแแข แญแ แจ C++ แฅแฅแ rule แแแข
โ Answer: TRUE
3. Does
*ptr = 11 change i to 11?Explanation:
ptr holds the address of i. Using *ptr means go to that address and change the value โ i becomes 11. ptr แจ i แ address แญแแแข *ptr = 11 แแแต "แแฐ address แแต แฅแ valueแแ แแญแญ" แแแต แแ โ i = 11 แญแแแแขโ Answer: TRUE
4. Can both
foo functions coexist?Explanation: Yes โ this is function overloading. Same name, different parameters = allowed.
โ Answer: TRUE
5. Is
strlen("Cletus") equal to 7?Explanation:
strlen() counts only the letters โ NOT the null character '\0'. "Cletus" = 6 letters โ strlen = 6. โ Answer: FALSE
PART II โ Multiple Choice
Q1. Which array declaration is NOT correct?
Explanation: Arrays must be initialized with curly braces
{}, not square brackets []. โ Answer: C
Q2. Which is NOT true?
Explanation: Option B says "when condition is false, the if body executes" โ that is completely wrong. When false, the else body runs.
โ Answer: B
Q3. Statement for alternate paths based on condition?
Explanation:
for and while are loops. The if statement is used for choosing alternate execution paths.โ Answer: A
Q4. Which is TRUE about arrays?
Explanation: Array size must be decided at compile time โ you can't change it while the program runs.
โ Answer: C
Q6. Correct variable name?
Explanation: Variable names can only have letters, digits, and underscore
_. $ and @ are not allowed in C++. โ Answer: B
Q7. Output of
str[5]?Explanation: Counting from index 0: H(0) e(1) l(2) l(3) o(4) space(5) โ space is at index 5.
โ Answer: C โ Space
Q8. Output of
-2 * array[2]?Explanation:
array[2] = 40 (third element). Then -2 ร 40 = -80. โ Answer: C โ -80
Q9. Pointer program output?
Explanation:
ptr = x assigns the value 7 as an address โ this is wrong. It should be ptr = &x. This causes a compiler error. โ Answer: C โ Error
Q10. Output of const program?
Explanation:
const means the value cannot be changed. Trying a++ on a const variable causes a compiler error. โ Answer: D โ Error
Q11. How many times is "CppBuzz.com" printed?
Explanation: i goes from 0 to 4 (when i=5, condition
i<5 is false โ no goto). So it prints 5 times. โ Answer: B โ 5 times
Q12. Output of a++, b, c?
Explanation:
b = a++ means b gets the current value of a (10) first, then a becomes 11. Then c = a โ c = 11. Output: 11 10 11 โ Answer: A โ 111011
Q13. Variable declared inside a function?
Explanation: A variable declared inside a function only exists within that function โ called a local variable.
โ Answer: B โ Local variable
Q14. Output of car() program?
Explanation: car() is called once in main โ prints "Audi R8" once.
โ Answer: A โ Audi R8
Q15. Output of fun(x, y)?
Explanation: fun uses pass by value โ it receives copies. Changing x and y inside fun does NOT affect the originals in main. So y stays 20.
โ Answer: B โ 20
PART III โ Short Answers
Q1. Declaration of x pointed to by Ptr:
Explanation: To declare a pointer to an integer variable:
int x;
int *Ptr = &x;
Q2. Pass by Value vs Pass by Reference:
Explanation :
Pass by Value -A copy is sent to the function and Original is NOT changed
Pass by Reference-The actual variable is sent using & and Original IS changed
@ProgrammingWithFaith2018
โค1๐1
void byValue(int x) { x = 100; } // original value แ แญแแญแญแ
void byRef(int &x) { x = 100; } // original value แญแแญแซแQ3. Function Overloading:
Explanation: Multiple functions with the same name but different parameters. The compiler chooses the right one based on the arguments passed. แ แแต แตแ แซแแธแ แแ แจแฐแแซแฉ parameters แซแแธแ functionsแข compiler แจแแ แฉแ แตแ arguments แฐแแญแฉแ แตแญแญแแแแ function แญแแญแฃแแข
int add(int a, int b) { return a + b; } // แแแต int
float add(float a, float b) { return a + b; } // แแแต float
// แ แแต แตแ แแ "add" - แแ parameters แญแแซแซแ
PART IV โ Output Questions
Q1. 2D Array output:
Explanation: The loops run only for
i=2, j=0 โ that is val[2][0] = 1. โ Output: 1
Q2a. break version:
Explanation:
sum=+i means sum = +i (assign), not sum += i (add). When i=3, break fires immediately before assignment.i=5 โ sum=5, i=4 โ sum=4, i=3 โ break!
โ Output: 4
Q2b. continue version:
Explanation:
continue skips to the next iteration. sum+=i comes after continue so it never executes. Sum stays 0. โ Output: 0
Q3. String program:
Explanation:
strncpy(z, y, 9) copies first 9 characters of y into z. Then z[9]='\0' ends the string.โ Output:
String y: It is a nice day
String z: It is a n
Q
4. Swap function:
Explanation : A is pass by value (copy), B is pass by reference (real). So only b changes in main.
A=4+18=22 (local), B=22-18=4 (b in main changes!), A=22-4=18 (local only)
Back in main: a=4, b=4
โ Output: 4, 4
PART V โ Programs
Q1. Income Tax
using namespace std;
int main(){
float salary, tax = 0;
cout << "Enter salary: ";
cin >> salary;
if(salary <= 200)
tax = 0;
else if(salary <= 600)
tax = (salary - 200) * 0.10;
else if(salary <= 1200)
tax = 400*0.10 + (salary - 600)*0.15;
else if(salary <= 2000)
tax = 400*0.10 + 600*0.15 + (salary-1200)*0.20;
else if(salary <= 3500)
tax = 400*0.10 + 600*0.15 + 800*0.20 + (salary-2000)*0.25;
else
tax = 400*0.10 + 600*0.15 + 800*0.20 + 1500*0.25 + (salary-3500)*0.30;
cout << "Income tax = " << tax << " Birr" << endl;
return 0;
}
Q2. Count students below 45
using namespace std;
int main(){
int n, mark, count = 0;
cout << "Enter number of students: ";
cin >> n;
for(int i = 0; i < n; i++){
cout << "Enter mark for student " << i+1 << ": ";
cin >> mark;
if(mark < 45)
count++;
}
cout << "Students below 45: " << count << endl;
return 0;
}
Q3. Enter until negative
using namespace std;
void enterNumbers(){
int num;
while(true){
cout << "Enter a number: ";
cin >> num;
if(num < 0){
cout << "Now you have entered a negative number" << endl;
break;
}
}
}
int main(){
enterNumbers();
return 0;
}
@ProgrammingWithFaith2018
โค4
If anyone has last year's C++ final exam, please post it here in the comment section. ๐ป๐
@ProgrammingWithFaith2018
๐ฒ
@ProgrammingWithFaith2018
๐ฒ
1.
Function declaration malet just le compilerแ sle function แแแแญ nw
Syntax : datatypes functions_name(parameters )
Example
int sum(int a,int b)
with parameter
int sum() without parameter
So
Answer:) D
Because it lack return type
2.
ANSWER:) A
We define structure first then we create a variable @ProgrammingWithFaith2018
Function declaration malet just le compilerแ sle function แแแแญ nw
Syntax : datatypes functions_name(parameters )
Example
int sum(int a,int b)
with parameter
int sum() without parameter
So
Answer:) D
Because it lack return type
2.
ANSWER:) A
We define structure first then we create a variable @ProgrammingWithFaith2018
โค3
5.
Arrya is collection of elements with the same data types.
To access first element of array we use
Array[0]
To access the last
Array[n-1]
But to access the memory address of first element just we call it's name
for example int ages[]={1,3};
ages // to access the memory address of first element
So
โ Answer :)D
6.
Strcpy(a,b) copies the entire string from b to a
So
โ Answer :) A
Arrya is collection of elements with the same data types.
To access first element of array we use
Array[0]
To access the last
Array[n-1]
But to access the memory address of first element just we call it's name
for example int ages[]={1,3};
ages // to access the memory address of first element
So
โ Answer :)D
6.
Strcpy(a,b) copies the entire string from b to a
So
โ Answer :) A
โค3