Menu bar

Thursday, April 24, 2014

WTP Question Bank

Sample questions for WTP and WAD**


HTML

  • Explain the following HTTP command
    GET /index.html HTTP/1.0 (4 Marks)
  • Write HTML tags to generate the following output. (3 Marks)
    Position
    Name
    CIty
    Sales
    Manager
    I. Hawthron Shield
    II. Green Sheild
    A. UK
    B. Netherland
  • How can a browser be stopped from caching a page? (2 Marks)
  • How Divide and Pound symbol can be put on HTML document? (2 Marks)
  • Show the use of inline frame in XHTML document. (3 Marks)
  • Explain the following HTML tags. (4 Marks)
    a. <dl> </dl>
    b. <input type=”file”/>
  • Answer the following with respect to web design. (7 Marks)
    1. Bowser compatibility issue and its possible solution.
    2. What is navigation? Discuss the characteristics of effective navigation.
  • What is an HTML form? Discuss the different form attributes and design
    a simple form to register for new semester. (7 Marks)
  • Explain following terms with example. (4 Marks)
    <optgroup>, <span>

CSS

  • Write the following styles in separate CSS file and also show how to link this CSS file in HTML file and show use of styles. (7 Marks)
    (i) The headings should have normal font style and font’s size should be 120%
    (ii) Define a class arial for paragraph which defines font family
    arial and font style bold.
    (iii) Apply a background color yellow and apply a
    background image “browntile.jpg”
  • What is the difference between class and id? How can a style rule be defined with an id redheading that gives red color to heading h1
    with text of heading right aligned? What would be the output of
    the following code in relation tostyle defined in this problem? (7 Marks)
    <h2 id=”redheading”> This is red heading</h2>
    <p id=”redheading”> This is red heading</p>
    <h1 id=”redheading”> This is red heading</h1>
  • What is CSS? Explain different ways to write the CSS and show the
    importance of “id” and “class” in CSS. (7 Marks)
  • Define CSS. Enlist and explain methods of using CSS in web page.
    Specify the CSS to provide; link: after visited blue color and before
    visited red color, table with odd rows white and even rows blue color. (7 Marks)
  • Explain CSS with all types. Explain BOX MODEL. (7 Marks)
  • Write down HTML/CSS code to create table with 5 rows and 3 columns. Even no. of rows display in green color and odd no.of rows display in
    yellow color. (7 Marks)

JavaScript

  • Write a JAVAScript to print characters of a string at odd positions.(for example for the string India, I, d and a should get printed). (4 Marks)
  • Write a JAVAScript to take2 digit number and then separate these 2 digits, then multiply first digit by itself for second digit times.( for example, 23 should be separated as 2 and 3. 2 should multiply with itself 3 times). (3 Marks)
  • Explain document object in JavaScript. (3 Marks)
  • How user defined objects are created in JAVAScript? How a
    constructor can be used to populate data in the object? (7 Marks)
  • Show the use of events to change background color with DHTML. If mouse button is pressed, background color
    should be red. If mouse button is released up, background color should be yellow (3 Marks)
  • Design an login form using HTML and JavaScript with following
    validations on password field : minimum length 8 characters, it should
    have some special character (7 Marks)
  • Why do you need validation? Show the use of regular expression in
    JavaScript to validate the email address with example. (7 Marks)
  • What are JavaScript objects? List the important built-in objects. How can
    you write your own object? (7 Marks)
  • Explain the event handling in JavaScript with simple example. (3 Marks)
  • Differentiate between HTML and XHTML. Write XHTML to generate table having following structure: (3 Marks)
    First
    Second
    Third
    Computer
    Civil

    Result
    :
  • Explain DOM structure of HTML. Write using JavaScript: how to know which mouse button was clicked, number of elements in form, and write
    hello world. (7 Marks)
  • Define DHTML. Explain onLoad, onBlur, image preloading, change
    image size, mouse curser position (7 Marks)
  • Differentiate between server side and client side scripting languages.
    Write HTML and JavaScript to take input for loginname, password,
    birthdate, email address, phone no. and validate them. (7 Marks)
  • What are differences between client side and server side scripting
    language? Write down java script code to check mobile number ( mobile
    number should start with 9 or 8) and mail id(check @ and .). (7 Marks)
  • Write down java script code to validate user name and password
    (password length must in between 6 to 12 characters. User name should
    not start with _, @, or any number, both are not blank). (7 Marks)

XML, XSLT, XSL, XHTML

  • Explain the document structure of XHTML document (4 Marks)
  • Explain the use of XSL Elements value-of, for-each, sort with example. (7 Marks)
  • Explain the two ways in which XML parser checks whether a
    document follows the expected order and structure. (7 Marks)
  • Give the document structure for the XHML document and give the
    characteristics which differentiate it from HTML (7 Marks)
  • What is DTD? Give and explain the sample DTD. (4 Marks)
  • XSL transformation (7 Marks)
  • Compare and contrast between HTML and XML. Write any XML
    document and DTD to describe itsstructure including elements,
    attributes and entities. (7 Marks)
  • Explain XSL and XSLT using example. (7 Marks)
  • Explain importance of DOCUMENT_ROOT and specify the same for
    apache web server. Specify the name and path for configuration file,
    error log file, access log file of apache. How to change the default file
    type being responded by web server. Define dynamic IP. Consider all in
    the question w.r.to Unix/Linux. (7 Marks)
  • Generate XML file from below code: (4 Marks)
    <!DOCTYPE NEWSPAPER [
    <!ELEMENT NEWS(ARTICLE+)>
    <!ELEMENT ARTICLE(HEADLINE, BODY, NOTES)>
    <!ELEMENT HEADLINE(#PCDATA)>
    <!ELEMENT BODY(#PCDATA)>
    <!ELEMENT NOTES(#PCDATA)>
    <!ATTLIST ARTICLE AUTHOR CDATA #REQUIRED>
    <!ATTLIST ARTICLE EDITOR CDATA #IMPLIED>
  • Explain following terms: <xs: sequence>, <value-of>, <for-each> (3 Marks)
  • What is XML ELEMENT and XML Schema? Explain CDATA and PCDATA with example. (7 Marks)

PHP

  • Write modules using HTML and PHP to store information of employee (employee id, job title, years of experience) in an array.
    And output the data to a web page by arranging the employees in
    ascending order of experience. (7 Marks)
  • Create a database called country and create table called city having fields (cityname, area, population)using PHP commands. Create an HTML form to get the city data and write a script to insert that data into the table. (7 Marks)
  • Write PHP programs to (7 Marks)
    1. To print whether current year is leap year or not.
    2. To print whether given number is odd or even.
  • Write PHP program to print first 10 Fibonacci numbers.
  • What are the different types of arrays in PHP? Explain with example to
    process the arrays in PHP. (7 Marks)
  • What are cookies? Explain the cookies handling in PHP with proper example. (7 Marks)
  • Explain the following with respect to PHP. (7 Marks)
    1. Sending an email
    2. String processing
  • How can you connect to database in PHP? Show the simple database
    operation using PHP with proper example. (7 Marks)
  • Explain different ways to pass information from one web page to other(s). Write a PHP program to explain any two ways. (7 Marks)
  • Write a note on server side include. Write a PHP program to
    demonstrate the same. (7 Marks)
  • Write a PHP program to parse and validate XML file using DTD (7 Marks)
  • Write a PHP program to create MySQL database and table; insert,
    retrieve data from table, alter the table to add a column and add data in
    that new column (7 Marks)
  • Explain need of URL redirection. Write the same in PHP, HTML and JavaScript. (7 Marks)
  • Explain variable function and magic methods using PHP program. (7 Marks)
  • How do you create cookie in PHP? Give difference between session and cookie with example. (7 Marks)
  • What’s myadmin and database bug. What’s function in PHP? Explain types of function with example. (7 Marks)
  • What’s PHP? Write down source code to create database and retrieve data with connection of PHP. (7 Marks)
  • How do you connect to server with PHP? Explain withexample. (7 Marks)
  • What are basic commands of PHP? Explain with example. (7 Marks)

Other

  • Explain the architecture of the browser. (3 Marks)
  • What role does the following parameter play in web site design issues? (4 Marks)
    a. Bandwidth and cache
    b. sitemap
  • Explain RSS <item> elements with example. (7 Marks)
  • What is a blog? (4 Marks)
  • What are Web feeds? (3 Marks)
  • Explain elements of SOAP with XML (7 Marks)
  • What is stored in Content-Type header for a SOAP request and response? (4 Marks)
  • What is the need for web service? (3 Marks)
  • What do you mean by planning a website? Discuss about the objectives
    and goals, and target audience in detail with proper example. (7 Marks)
  • How do you identify the contents for your website? How do you organize
    them for easy and quick access? Discuss with some real example. (7 Marks)
  • Web feeds (3 Marks)
  • Enlist and explain the website design principles. (7 Marks)
  • Specify port numbers for httpd and mysqld services. (1 Mark)
  • Explain need and working of web services with diagram. (7 Marks)
  • Explain web feed and blogs with their importance and in specific
    situation where they should be used. (7 Marks)
  • Explain the settings required for apache web server and PHP to run PHP programs. Mention how to do the following: consider all the questions
    w.r.to Unix/Linux. (7 Marks)
    – Start mysql and apache services and how to check status.
    – Take backup of mysql database tables and how to restore them.
    – How logging of web server users.
  • Explain following terms: URI, Web browser, HTTP (3 Marks)
  • Give the answer of following question. (7 Marks)
    i) Justify it:” HTTP is called as stateless protocol”.
    ii) How can you open a link in a new browser window?
    iii) What’s the correct syntax for referring to an external script called
    “abs.js”?
    1) <script href=”abc.js”>
    2) <script src=”abc.js”>
    3) <script target=”abc.js”>
    iv) What is difference between Java script and JAVA?
    v) Give difference between DTD and XML schema.
    vi) Justify it: “Java script is used in validation techniques”.
    vii) Which file can be configured for Apache Web Server?
  • What’s contribution of SOAP, Web feeds and BLOGS toweb services? What is aggregation in web services? (7 Marks)
  • What’s SOAP? Explain structure of SOAP. (7 Marks)
  • Explain Web server. Give difference between IIS and Apache Web Server? Write down only steps of UNIX/LINUX web server. (7 Marks)
    What is the relation ship among SOAP, XML, and HTTP? Explain with example (7 Marks)
**These questions are solely for your reference purpose and further understanding it may or may not be asked in the GTU Examination. First solve your textbook questions and university papers and then try to solve these questions.

Wednesday, April 23, 2014

Class Test paper solution

1. Explain and Differentiate Uninformed Search and Informed Search strategies

  • Uninformed
    • BFS
    • DFS
  • Informed
    • Best first search
    • A*
    • Hill climbing
    • Simulated annealing 
    • Etc....

2. Solve the given 8-puzzle problem using hill climbing. (Apply global heuristic function.)

Initial state                       Goal state
2 8 3                                1 2 3
1 6 4                                8   4
7 5                                  7 6 5

8 puzzle using hill climbing



3. Convert following propositional wff into clauses.
¬[((P ∨ ¬Q) -> R) -> (P ∧ R)]

propositional wff to clauses




4. Assume the following Facts:

Rama only likes easy courses.
Engineering Courses are hard.
All the courses in the electrical department are easy.
EE101 is an electrical engineering course.

Use the Resolution to answer the question, “What course would
Rama like?”

Resolution

Monday, April 21, 2014

CPU QUESTION BANK


Dear students,
                        This post is a question bank prepared on the basis of questions asked in GTU EXAM. The questions are classified according to the chapters and corresponding years of examination.
                       Over the time your syllabus may have changed but you can get an idea about what type of questions can be asked from each chapter.
                       I have already published the unit wise mark weightage given by GTU on the syllabus page (Click here to view). I hope you will utilize this resource effectively and still if you have any doubts feel free to ask me.



Chapter-1 Introduction to computer and programming

JAN-2013

1. Draw the Block diagram of Computer System and explain.
2. Explain the following terms in brief:
Operating System, Compiler, Global Variable, Header Files
3. Explain various symbols used in Flowchart and draw the flowchart for finding
Factorial of a number given by user.

JUN-2012

1. What is software? List the various categories of software and their use.
2. What is flowchart? Draw a flowchart to print first N Fibonacci numbers.
3. Differentiate between compiler and interpreter.

JAN-2011

4. Explain the ‘C’ Development life cycle using flowchart in detail.

JUN-2011

5. Draw a flowchart to count odd numbers and making their total from given N numbers.

DEC-2011

6. What is Algorithm?
7. Explain various symbols used in Flowchart and draw the flowchart for finding
smallest number out of three given numbers.
8. Draw the Block diagram of Computer System and explain.
9. Define: Software, Hardware, Higher level Language, Operating System.

APR-2010

10. Draw a flow chart to find factorial of a given number.

JUN-2010

11. Name the major components of computer and give their function in brief.

NOV-2010

Chapter-2 Fundamentals of ‘C’


JAN-2013

1. Explain the primary data types used in C.
2. Explain various operators used in C language.

JUN-2012

1. Explain the “?:” (ternary) and “sizeof” operators with proper examples.
2. What are the logical operators in C? List and explain them.
3. What do you mean by local and global variables? Give their scope and life time and
compare them.

JAN-2011

4. What are tri-graph characters? How are they useful? Explain any five of them
5. Explain the classification of operators in C in brief.
6. What is type conversion? Explain the type conversions supported by C Language.

JUN-2011

7. Justify, “C is middle level language.

DEC-2011

8. Explain printf() and scanf() giving their syntex.
9. Explain switch…case statement.
10. Explain various operators used in C language.
11. Data types in C.
12. Scope and Lifetime of Variable.
APR-2010
13. Explain implicit type conversion and explicit type conversion withexample.
14. Explain different operators used in C language.

JUN-2010

15. Give the meaning and output of following C statements.
a. x = 1,2,3;
b. a = (b = 4, c = 5, b+c);
c. if( x = 5)
printf(“x is even\”);
else
printf(“x is odd\n”);
16. Provide two major differences between
a. Software and Hardware
b. Flowchart and Algorithm
17. Write an algorithm and draw the flowchart to accept N numbers and count how many
of them where odd and also compute sum of all these odd.
18. Explain the various I/O function with example in C.

NOV-2010

19. Explain in brief the features of C language.
20. Explain logical operator and relational operator used in C language.
21. Draw a flow chart to find the smallest number out of three given numbers
22. Write a program to convert temperature entered by user from Fahrenheit into Celsius.
23. Explain the different data types of C language.

Chapter-3 Control Structures in ‘C’


JAN-2013

1. Explain switch…case statement with brief example.
2. Explain the difference between while and do..while statement.
3. Write a program to display following pattern using nested for loops.
1
1 3
1 3 5
1 3 5 7
For n lines.
4. Write a C program to check whether the given number is Prime or not.
5. Write short notes on following:
(i) Nested if..else statement.
(ii) Use of break and continue statement.

JUN-2012

1. Explain the multiple (ladder) if-else with syntax and proper example.
2. Assume that you want to make the sum of 1 to 100. Give the necessary code to
perform the same using (1) For loop (2) While loop (3) Do-while loop.
3. Explain the use of break and continue statement with example.

JAN-2011

4. Write the basic differences between the while loop and do-while loop with suitable
example.

JUN-2011

5. How can you define infinite loop using while?
6. What is looping? Explain different types of loops in C and compare them.
7. Show how to sum 1 to 10 using each of these loops.

DEC-2011

8. Write a program in C to generate Fibonacci series like following:
9. 1, 1, 2, 3, 5, 8, 13 …
10. Generate 20 such numbers.
11. Write a program to display following pattern using nested for loops.
* * * *
* * *
* *
*

APR-2010

12. Write a program to accept three number from user and print maximum number.
13. Explain if…else if ..ladder with flowchart.
14. Explain for loop. Differentiate use of continue, break and go to statement.
15. Write a program to print following pattern using loop statement for n row.
1
1 3
1 3 5
1 3 5 7
16. Explain operator precedence and associativity.

JUN-2010

17. What is infinite loop in C? How can you create it? Give an example of situation where
you need to use infinite loop?
18. Write a C program to display the following triangle for N lines.
1
A B
1 2 3
A B C D
1 2 3 4 5
19. Write a C program to display the following triangle for N lines.
1
A B
2 3 4
C D E F
5 6 7 8 9

NOV-2010

20. Explain “if …else…if” ladder of C with neat diagram and a brief program code
21. Compare for loop and while loop with illustration.
22. Write a program to generate Fibonacci series of numbers (total 20 numbers)
23. Write a C Program to check whether the given number is prime or not.

Chapter-4 Array & String


JAN-2013

1. What is String? Explain any four string handling functions in C.
2. Write a C program to read 10 numbers from user and store them in an Array.
Display Sum, Minimum and Average of the numbers.
3. Write a C program to Multiply two 3 X 3 Matrix. Read Two matrices from the user.

JUN-2012

1. Write a program to find the minimum value from the array of 3x3
2. Write a program which accepts a long string and print only characters at positions
which are multiple of 3.

JAN-2011

3. Explain the storage class specifiers in C.
4. Explain getchar() and gets() functions with suitable example.
5. Explain putchar() and puts() functions with suitable example.
6. List the advantages and limitations of Array in C.

JUN-2011

7. Define an array of 10 integer pointers.
8. Write a C program to accept a string and print every third character from string only if
it is lower case.
9. Define an array of structure with integer, string and float as members. Size of array is

APR-2010

10. Write a program to find maximum element from 3 × 3 metrics.

DEC-2011

11. Explain how string is defined in C. Write user defined functions for the following:
(i) strlen() : to find length of string.
(ii) strcat() : to concate two strings.
12. Write a C program to Add two 3 X 3 Matrix.
13. Write a C program to read 10 numbers from user and find Sum, Maximum
and Average of them.

APR-2010

14. Write a program which declares array of 10 integers, enter the data and small the
elements which are even. Also find the maximum number from them.
15. Explain strcat( ), strcpy( ) ,strncmp( ) and strstr( ) string manipulation function.
JUN-2010
16. Write a C program to reverse a string given from keyboard. Don’t use library function
to reverse it.
17. Write a C program to accept array of N integers and find the largest odd number as
well as largest even number and display them.
18. What is a string? How string is stored in C? Give the various functions with their use
for string processing.
NOV-2010
19. Write a program to store 10 numbers in an array. Then find out Sum, Maximum
andAverage of these 10 numbers.
20. Explain following string manipulation functions.
strcmp(), strlen(), strcat(), strstr() ;

Chapter-5 Functions

JAN-2013

1. Write a short note on Categories of Functions.

JUN-2012

1. What is function? Explain the function definition, function prototype and function call
with example.
2. What is call by value? Clear it with example.
3. Write a function which accepts a string and returns the length of the string.

JAN-2011

4. Write a C program in which a 5 digit positive integer is entered throughkeyboard;
write a function to calculate the sum of digits of the 5 digit numberwith using
recursion.
5. Explain the various types of function calls in C.

JUN-2011

6. Give a prototype of function accepting an integer pointer and a float as arguments and
returns nothing.
7. Write a C function to exchange two numbers and use it to reverse an arrayof 10
integers accepted from user.

DEC-2011

8. What is recursion? Explain it with suitable example.
9. What is used defined function? Explain types of functions with example.

APR-2010

10. Write a function which receives number as argument and return sum of digit of that
number.
11. Which are various categories of functions? Explain any one with example.

JUN-2010

NOV-2010

12. List out the categories of functions of C. Explain any one category with example.

Chapter-6 Pointers

JAN-2013

1. What is Pointer in C? Explain its advantages. Also write a function to do swapping of
two elements using pointer. Call this function in main().

JUN-2012

1. What is pointer? Clear it with examples and give its use.
2. Show the use of the malloc() function.

JAN-2011

3. Explain Dynamic Memory Allocation functions with syntax.

JUN-2011

4. Give the meaning of
a. int (*f)(int,int) ;
b. int *f(int,int);
5. How can you allocate memory dynamically for 10 floating point numbers?

DEC-2011

6. Write short note on Pointer.

APR-2010

7. What is dynamic memory allocation? What is difference between malloc and calloc ?
8. What is a pointer? Write a program using pointer to read in an array of integers and
print its elements in reverse order.

JUN-2010

9. Explain the following with proper syntax and examples.
10. Pointers in C 2. Call by value Vs. Call by reference

NOV-2010

11. What is pointer? Give its benefits. Write a program to do swapping of two
elements using function with two pointers as arguments.

Chapter-7 Structure and Union

JAN-2013

1. What is structure in C? Define a structure named “Student” with roll_no, name and
percentage as members. Read data of 5 students from user and display them in proper
format.

JUN-2012

12. Define the union.
13. What is structure? Define the structure and explain how to access the structure
members.

JAN-2011

14. Differentiate Structures and Unions with example.
15. Explain the various ways to access the structure members with proper syntaxin C
language.

JUN-2011

16. What is structure? How can we access structure members? Clear use of nested
structure using example. Compare structure with union.

DEC-2011

17. What is structure? Explain with example how to declare a structure and how to initialize it.

APR-2010

18. State difference between Structure and Union.

JUN-2010

NOV-2010

19. State the difference between Structure and Union.
20. What is “structure”? How do we declare and access structure variables?

Chapter-8 File

JAN-2013

1. Write short notes on File Operations in C.

JUN-2012

1. What is file management? List the different file management functions and explain
the various file modes.
2. Write a program to display the contents of a given file.
3. List the various in-built string functions.

JAN-2011

JUN-2011

DEC-2011

4. Write short notes on following.
5. File Operations in C.

APR-2010

JUN-2010

NOV-2010

CPU ASSIGNMENTS

Assignment 4(Array & Pointer)


1 List the advantages and limitations of Arrays in C
2 what is Pointer? And need of pointers.
3 explain the pointers in C with proper syntax and examples.
4 How to initialize the pointer?
5 Difference between Pointers and Arrays

Assignment 5(Functions & String)


1 List out categories of functions of C. Explain any one category with example
2 what is user defined function? Explain types of functions with example
3 Explain function prototype.
4 Define function with different parameters.
5 Explain function call with example
6 Explain actual argument and formal argument in function
7 Difference between call by value v/s call by reference with example
8 what is scope, visibility and life time of variables in function?
9 what do you mean by local and global variables? Give their scope and life time and compare them
10 Explain storage class specifiers in detail
11 what do you mean by recursive function? Explain with example
12 what is string? Explain various string handling functions

Assignment 6 (Structure & Union)


1 Difference between structure v/s union
2 what is structure? How do we declare and access structure variables?

3 Explain various ways to access the structure members with proper syntax in C language

** last date of submission was 28/04/14 which has been extended to 30/04/14