vu cs504 Mid Term Subjective Solved Past Paper No.1

vu cs504 Software Engineering - I Solved Past Papers

Solved Past Papers

This subjective solved past paper is related to book/course code vu cs504 Software Engineering - I which belongs to vu organization. We have 7 past papers available related to the book/course Software Engineering - I. This past paper has a total of 10 subjective questions belongs to topic Mid Term to get prepared. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to get prepared for exams by learning subjective questions online on NVAEducatio.

NVAEducation also facilitates users to download these solved past papers with an affordable prices. However, users are not enforced to pay for money, rather they can use credits to buy such stuff on NVAEducation. Users can earn credits for doing some little tasks and then you will be able to use that credits to buy solved past papers on NVAEducation.

Question 1: Identify each of the following as function call, function definition and function declaration.
int func(int num1, int num2);
int func(int, int);
func(5, 6) ;
int func(int num1, int num2){}
Answer:

int func(int num1, int num2);

  1. Function call: Function;
  2. Function definition: Integer;
  3. Function declaration: Num1 and Num2

int func(int, int);

  1. Function call: Function ;
  2. Function definition: Integer;
  3. Function declaration: integers

func(5, 6) ;

  1. Function call: Function;
  2. Function definition: numbers;
  3. Function declaration: 5 & 6

int func(int num1, int num2){}

  1. Function call: Function ;
  2. Function definition: Integer;
  3. Function declaration: Num1 and Num2
Question 2: What is the difference between switch statement and if statement.
Answer:
  1. IF statement is used when we have to check two conditions while switch is a multi conditional control statement.
  2. SWITCH statement can be executed with all cases if the "break" statement is not used whereas IF statement has to be true to be executed further.
Question 4: What is the difference between while and for loop?
Answer:
when number of iterations known we use for loop otherwise we will use while loop
Question 5: What is the keyword "this" and what are the uses of "this" pointer?
Answer:
"this" is use to refer the current class member without using the name of the class.
Question 6: What is the purpose and syntax of the const keyword
Answer:
Through "const", if we have to change the size of the array, we only have to change the value of array Size where it is declared. Syntax of const is const variable-name [ = value];
Question 7: What is the purpose of the default statement
Answer:
The default statement is optional. If there is no case which matches the value of the switch statement, then the statements of default are executed.
Question 8: What is the this pointer. Give an example of its use.
Answer:
This pointer is use to points to the current object in programming.
Question 9: What is wrong with following code and also give the reason of error?
int x , y ;
int *ptr1 = &x ;
int *ptr2 =&y ;
ptr1+ptr2;
Answer:
We need one more variable in which we put sum of ptr1 and ptr2 like int z; z=ptr1+ptr2;

Solved Past Papers of cs504 Software Engineering - I

Other cs related subjective solved past papers

Other categories of vu Solved Past Papers

Other organizations

Theme Customizer

Gaussian Texture



Gradient Background