Professional Documents
Culture Documents
Data Structures Csc211 Sessional 1
Data Structures Csc211 Sessional 1
TIME: 01 Hour
INSTRUCTIONS:
Write to the point answers, and all questions carry equal marks.
Its open book and if found copied, then straight ZERO will be given.
---------------------------------------------------------------------------------------------------------------------
1. Briefly explain in your own words that why data structures are required?
(2)
(2)
(2)
(2)
int foo [] = {1, 2, 2, 11, 21, 22, 32, 33, 43, 44, 45, 55};
int n, result=0;
int main ()
{
for ( n=0 ; n<10 ; ++n )
{
result += foo[n];
}
cout<<result;
return 0;
}
Page 1 of 2
(2)
--------------------------------------------------------------------------------------------------------------------Good Luck
Page 2 of 2