LATEST UPDATE

CIMA study stuff added

BOX

Monday, November 29, 2010

PAPER

Department of Computer Science

University of Karachi

BSCS- Compiler Construction

Q1) Select true or false of the following.

1. All variables must be declared before they are used. True / False

2. The expressions a + b % c and (a + b) % c are equivalent. True / False

3. The expressions a - b - c and a - (b - c) are equivalent. True / False

4. The expressions 15 / 3 and 15 / 3.0 are equivalent. True / False

5. The following declaration is used to declare a variable with Boolean type.
bool flag ; True / False

6. If str is a string variable that holds the string "The good life", then str[3] refers to the character 'e'. True / False

7. A header file typically contains type definitions, function prototypes and the implementations of the function. True / False

8. If a function has a local variable x and there is also a global variable called x, then the statements in the function which use x refer to the local variable. True / FalseA lexical analyzer transforms a stream of tokens into an AST (Abstract Syntax Tree). True / False

9. Lexical analyzers based on a FSA (Finite State Automaton) efficiently match multiple token descriptions concurrently to the input stream. True / False

10. Each input character is inspected only once. True / False

11. A lexical analyzer generated by lex is essentially a FSA. True / False

12. A parser transforms a stream of tokens into an AST (Abstract Syntax Tree). True / False

13. A lexical analyzer generator automatically constructs a FSA (Finite State Automaton) that recognizes tokens. True / False

14. The generator is driven by a regular description True / False

15. A parser transforms a stream of characters into a stream of tokens. True / False


Q2) Select one from the following- MCQs

1. In C, the term ``white space'' means:
a. A single space, tab or new-line character.
b. Several spaces, tabs or new-line characters.
c. Any combination of spaces, tabs and new-line characters.
d. All of the above.

Your answer: ______

2. What is the value of the integer expression: 1 - 3 * 5 + 6 / 4 % 2
a. 0
b. -6
c. -8
d. -13

Your answer: ______

3. By the rules of short-circuit evaluation, in the following expression,
p || ( n < style="">

a. if p is true, then n <> will not be evaluated.
b. if
p is false, then n <> will not be evaluated.
c. if
p is true, then n <> will be evaluated.
d. None of the above.

Your answer: ______

4. If p and q are Boolean variables, which expression is equivalent to the following expression?
! ( p || q)
a.
!p || !q
b.
p || q
c.
!p && !q
d.
p && q

Your answer: ______

Q3) Give unambiguous grammar of Algebraic expressions that parse +, -, *, / and ^ operators as well as ++ increment and -- decremetn operator.

Q4) Give selection set of the grammar of Q1.

Q5) Give grammar that parse the following patterns.

a) 1n 0n

b) 1n0m1m0n

Q6) Give attributed translation grammar that parse if / else construct and generate appropriate jump, conditional jump and label intermediate instructions.

Thursday, November 25, 2010

DCN-II COURSE OUTLINE

TOTAL DCN-II SLIDES

ARP
Dhcp
HDLC
Icmp
IPSec
IPV4
IPV6up
lect+ckt
lect+for+pckt
TCP
TLS-SSL
VLANS
VPNs
X25
ATMIntro



Click here to download DCN-II COMPLETE SLIDE

Tuesday, November 16, 2010

Saturday, November 13, 2010

COMPILER LAB 5



Assalam-o-allaikum!!
yeh cfg de thee aur
Ma'am nay kaha tha lab04 ki madad se is ko implement kr saktey hain...
|||---Zu|3@!R---->>>

Sunday, November 7, 2010

Wednesday, November 3, 2010

MASHALLAH UNIVERSITY2.tk achieved 1000 plus visitors Thanx to almighty ALLAH n all ov u of BSCS 3rd year Section A .

regards ,
MUHAMMAD IBRAHIM SHEIKH

Tuesday, November 2, 2010

HT MESSAGE




INStructions To follow:

ü All groups on same day must come at 9’O clock or 4’O clock and have to attend the complete presentation session for full credits.

ü You have to prepare a .ppt presentation. The ppt presentation must contain logical stuff.

ü In Simulation logical means Entities , attributes, state variables, events, discrete and continuous variable in your system, components of system, UML showing relationships between classes, flow charts and results of your running code.

ü In CG logical means the work you have done from Lab9 to Lab 13 with hierarchical scene graph and screen shots.

ü Demo of running code is must.

ü Your folder must name as projectTitle_SeatNos. For e.g QueuingSystem_045-010. Also Make a folder having exes with images and dlls for quick run







UBIT

SMS AT ANY NETWORK

STAND UP 4 THE CHAMPION

Search This Blog