W2_Programming-Qs 3:
Consider the following program and fill in the blanks in LINE-1 with appropriate function
header so that it will take one argument as call by reference and in LINE-2 for the return statement.
Consider the given test cases
PROGRAM:
#include <iostream>
using namespace std;
int Double(int a) { // LINE-1
return 2*a; // LINE-2
}
W2_Programming-Qs 4:
Consider the following program and fill in the blanks at LINE-1, and LINE-2. LINE-1
should be filled with dynamic memory allocation code which will allocate memory to the
pointer p for three integers. LINE-2 should be filled with memory deletion code. Consider the
sample test cases.
PROGRAM:
int main() {
int *p;
p =new int ; // LINE-1
process(p);
delete(p); // LINE-2
return 0;
}
FOLLOW OUR WEBSITE FROM THE BUTTON PROVIDED TO THE BOTTOM OF PAGE TO GET SOON ANSWERS OF PROGRAMS.
Disclaimer: Here you can find all nptel assignment solutions related to CS stream.These may help you for your assignment.The answers are only for verification.You cannot copy these directly from the post(code of conduct of NPTEL).These is not 100% correct solutions.
Disclaimer: Here you can find all nptel assignment solutions related to CS stream.These may help you for your assignment.The answers are only for verification.You cannot copy these directly from the post(code of conduct of NPTEL).These is not 100% correct solutions.
No comments:
Post a Comment
If you have any problems related to solutions or any concept please let me know.