Skip to main content

CS504 Current Final Term Fall 2013 Shared by SAm File 6

My Cs504 PAPer 7/3/14
50% of Mcqs were from past papers .
Subjective Part:
Questions Of 2 marks
Q. which design pattern would you suggest for an application where hang in one object state is immediately notified to linked objects? (2)
Ans: Observer Pattern pg n0 140
Q. write the following C statement according to the AnSI standard (2)
int factorial ();
Q. how names representing global variables in C++ should be in coding style guide?
Ans: Global variables in C++ should always be referred to by using the :: operator.
::mainWindow.open() , ::applicationContext.getName() pg no 150
Q. what is Software debugging?
Answer: Software debugging is the process by which developers attempt to remove coding defects from a computer program.
Questions of 3 marks:

Write any three attributes of a program that contribute towards making the program
self documented? (3)
Answer: There are a number of attributes that contributes towards making the program
self documented. These include, the size of each function, choice of variable and other identifier names, style of writing expressions, structure of programming statements, comments, modularity, and issues relating to performance and portability.

Q, How many level of exception safety are there? NAme those levels.
Anwer : Levels of Exception Safety pg no 188
Basic Guarantee: Ensures that temporaries are destroyed properly and there are no
memory leaks.
Strong Guarantee: Ensures basic guarantee as well as there is full-commit or rollback.
No-throw Guarantee: Ensure that a function will not throw.
Q. In the context of three-tier architecture, "interface" of an application represents which layer? (3)
Answer : presentations, application , database (not sure)

Questions of 5 marks :
Q. As a programmes you are instructed to write potable code in order to increase the modality of the software by your team lead . Which points you have to keep in mind to developing a portable code ? (5)
Ans: pg no 179
Q. the code given below contains a bud , identify the bug class and also explain the reason for the bug (5)
char s1[]= "This is a sentence" ;
char *s2;
s2 = (char*) malloc (strlen(s1) +1);
strcpy(s2,s);
Q. Consider the given below statement
*x +=(*xp=2*k<(n-m) ? c [k+1] : d[k--1]));
The above statement is complex ans difficult to read. Re-write the above statement by breaking it into multiple statements to make it more readable .(5) pg no 164
Ans: This statement liberally uses a number of operators and hence is very difficult to follow and understand. If it is broken down into simple set of statements, the logic becomes easier to follow as shown below:
if (2*k < n-m)
*xp = c[k+1];
else
*xp = d[k--];
*x = *x + *xp;
Q. Let's assume we have a system for stock market which provides data for several types of client. We want to have a client implemented as a web based application but in near future we need to add clients for mobile devices , Palm or Pocket Pc , or to have a system to notify the users with SMS alerts Which design pattern is best suited for the above scenario and why ? (5)
Answer:  Observer pattern pg no 140 




Comments

Popular posts from this blog

CS614 Quiz No.4 Shared by Princess (solved), Spring 2014

  “What means What”. The phrase refers to: Select correct option:  Meta data  External data Transformed data Internal representations Question # 2 of 10 Which of the following is NOT one of the activities of “Maintenance and Growth” phase in Kimball’s DWH development approach? Select correct option: Education Technical Education Program Support  Interface Deployment                 Question # 3 of 10 Horizontally wide data means: Select correct option: Dataset has large no. of attributes Dataset has large no. of records Dataset has attribute skews Dataset has partitioning skews                 Question # 4 of 10 Which of the following is NOT one of the top-10 mistakes that should be avoided during DWH development? Select correct option: Not interacting directly with end ...

CS614 Quiz No.4 Shared by MT Khan (Solved)

Question # 1 of 10 ( Start time: 09:04:39 PM ) Total Marks: 1 A typical cycle of implementing the change in DWH comprises of the sequence: Select correct option: Production -> QA -> Development Development-> QA -> Production(CORRECT) Development -> Production -> QA Production -> Development -> QA Question # 2 of 10 ( Start time: 09:05:16 PM ) Total Marks: 1 Vertically wide data means: Select correct option: Dataset has large no. of attributes Dataset has large no. of records(CORRECT) Dataset has attribute skews Dataset has partitioning skews Question # 3 of 10 ( Start time: 09:05:43 PM ) Total Marks: 1 In ___________ phase of kimballs approach, we identify the components needed now and in future. Select correct option: Requirement definition Architectural design Product development Analytical application development Question # 4 of 10 ( Start time: 09:06:56 PM ) Total Marks: 1 Technical architecture design supports the communicat...

CS614 Quiz No.3 Shared by Students (Solved), Spring 2014

______ index stores first value in each block in the sequential file and a pointer to the block.  Select correct option:   Dense  Sparse  B-Tree  Hash In context of data parallelism, the work done by query processor should be:  Select correct option:  Almost zero  Maximum  Pipelined  Filtered across partitions The optimizer uses a hash join to join two tables if they are joined using an equijoin and  Select correct option:   Outer table has less number of rows  Inner table has less number of rows  Cardinality of tables is equal  Large amount of data needs to be joined Bitmap index is appropriate for:  Select correct option:  Low cardinality data  High cardinality data  Clustered data  Aggregated data If a task takes “T” time units to execute on a single data item, then execution of this task on “N” data items will take __...