Friday, May 31, 2013

PHP MCQ Test – 1

Que.1. Use the ___________ to delete the data inside the table, and not the table itself?
A.    DEOP TABLE
B.    DELETE TABLE
C.    TRUNCATE TABLE
D.    REMOVE TABLE

Right Answer: C

Que.2. In mail($param1, $param2, $param3, $param4), the $param2 contains:
A.    The message
B.    The recipient
C.    The header
D.    The subject

Right Answer: D

Que.3. Which of the following delimiter is ASP style?
A.    <% %>
B.    <? ?>
C.    <script language=”php”></script>
D.    All of the above

Right Answer: A

Que.4. What is the purpose of basename() function in PHP?
A.    Returns the last accessed time of the file
B.    Returns the first accessed time of the file
C.    Strips of the path and returns the file name.
D.    Strips of the path the returns of the folder name.

Right Answer: C

Que.5. In PHP, fgets() is used to read a file one line at a time.
A.    TRUE
B.    FALSE

Right Answer: A

Que.6. Which of the following statement produce different output
A.    <? echo “this is php example”; ?>
B.    <P=”This is php example”;?>
C.    <?php echo “This is php example”; php?>
D.    <script language=”php”>print “This is php example”;</script>

Right Answer: C

Que.7. Which of the following data type is compound datatype supported by PHP.
A.    Array
B.    String
C.    Float
D.    Boolean

Right Answer: A

Que.8. Which of the following functions in PHP do not return a timestamp?
A.    time()
B.    date()
C.    strtotime()
D.    localtime()
E.    gmmktime()

Right Answer: BD

Que.9. Which of the following are valid float values?
A.    4.5678
B.    4
C.    7.00E+04
D.    All of the above

Right Answer: D

Que.10. Which of the following type specifier is invalid in printf() functions.
A.    %  a
B.    %  b
C.    %  c
D.    %  d

Right Answer: A

Que.11. Transactions are used to treat sets of SQL statements atomically.
A.    TRUE
B.    FALSE

Right Answer: A

Que.12. How does the identity operator ===compare two values in PHP?
A.    It converts them to common compatible data type and then compares the resulting values.
B.    It returns True only if they are both of the same type and value
C.    If the two values are strings, it performs a lexical comparison
D.    It based its comparison on the C strcmp function exclusively
E.    It converts both values to strings and compares them

Right Answer: B

Que.13. Which of the following is not an SQL aggregate function?
A.    AVG
B.    SUM
C.    MIN
D.    MAX
E.    CURRENT_DATE()

Right Answer: E

Que.14. The _____________ statement is used to delete a table in MySQL.
A.    DROP TABLE
B.    DELETE TABLE
C.    DEL TABLE
D.    REMOVE TABLE

Right Answer: A

Que.15. The ____________function parses an English textual date or time into Unix timestamp in PHP.
A.    strtodate()
B.    stroftime()
C.    strtotime()
D.    str_to_time()

Right Answer: C

Que.16. Which function(s) in PHP computes the difference of arrays?
A.    array_diff
B.    diff_array
C.    arrays_diff
D.    diff_arrays

Right Answer: A

Que.17. ______________ Returns the time of sunrise for a given day / location in PHP.
A.    datesunrise()
B.    date_sunrise()
C.    date-sunrise()
D.    date.sunrise()

Right Answer: B

Que.18. What is the difference between print() and echo() in PHP?
A.    echo can take multiple parameters where as print not
B.    print has a return value of 1 so it can be used in expressions where as echo has a void return type
C.    echo() can be used in the CLI version of PHP, while print() can’t
D.    print() can be used in the CLI version of PHP, while echo() can’t
E.    There’s no difference: both functions print out some text!

Right Answer: AB

Que.19. The ___________ function is used to read a single character from a file in PHP.
A.    fgetc()
B.    fgets()
C.    fget()
D.    fgetf()

Right Answer: A

Que.20. In PHP, which of the following(s) count elements in an array?
A.    count
B.    Sizeof
C.    Array_Count
D.    Count_array

Right Answer: AB


.NET MCQ Test – 1

Que.1. Which query expression is used to limit the number of results?
A.    Skip
B.    Take
C.    Where
D.    D.Select

Right Answer: B

Que.2. Which of the following are required to enable users to change the title of web part?
A.    CatalogZone
B.    TitleZone
C.    EditorZone, AppearanceEditorPart
D.    WebPart

Right Answer: C

Que.3. Application_Start event is available in which file?
A.    Global.asax
B.    Local.asax
C.    Web.config
D.    None

Right Answer: A

Que.4. Why should you write the cleanup code in finally block?
A.    Compiler throws an error if you close the connection in try block.
B.    Resource cannot be destroyed in catch block.
C.    Finally blocks run whether or not exception occurs.
D.    All choices are correct.

Right Answer: C

Que.5. Which LINQ statement defines the range variable in a LINQ query?
A.    from
B.    select
C.    join
D.    where

Right Answer: A

Que.6. Which of the following are correct?
1.    Delegates are like C++ function pointers.
2.    Delegates allow methods to be passed as parameters.
3.    Delegates can be used to define callback methods.
4.    Delegates are not type safe.

A.    1,3,4
B.    1,2,3
C.    2,3,4
D.    All are correct

Right Answer: B

Que.7. Which of the following is true?
A.    DataTable object contain DataRow and DataColumn objects
B.    DataSet and DataTable can be binary serialized
C.    DataSet and DataTable can be XML serialized
D.    All choices are correct

Right Answer: D

Que.8. namespace A
{
class MyClass
{
public void fun()
{
Consol.WriteLine(“C # is fun”);
}
}
namespace B
{
class MyClass
{
public void fun()
{
Console.WriteLine(“C # is interesting”);
}
}
}
}
Consider the above code what will be the output of following program

class Program
{
static void Main(string[] args)
{
A.MyClass obj = new A.MyClass();
obj.fun();
}
}

A.    C # is interesting
B.    C # is fun
C.    compiler time error
D.    None

Right Answer: B

Que.9. Which of the following are correct?
1.    Indexers enable objects to be indexed in a similar manner to arrays.
2.    The this keyword is used to define the indexers.
3.    Indexers can be overloaded.
4.    Indexer cannot be used in interface.

A.    1,2
B.    3
C.    1,2,3
D.    None

Right Answer: C

Que.10. Which of the following are correct?
Properties in .NET can be declared as
1.    Static, Protected internal, Virtual
2.    Public, internal, Protected internal
3.    Only public
4.    None

A.    1,2
B.    3
C.    1,2,3
D.    4

Right Answer: A

Que.11. class Myclass
{
public in count = 0;
public Myclass()
{
Count++;
}
}


class Program
{
Static void Main (string[] args)
{
Myclass obj1 = new Myclass(); Console.WriteLine(obj1.count);
Myclass obj2 = new Myclass(); Console.WriteLine(obj2.count);
Myclass obj3 = new Myclass(); Console.WriteLine(obj3.count);
}
}

A.    1,1,1
B.    1,2,3
C.    0,1,2
D.    All of the above

Right Answer: A

Que.12. An interface ca contain declaration of
A.    Methods, properties, events, indexers
B.    Methods
C.    Static members
D.    All of the above

Right Answer: A

Que.13. int[] numbers ={5,4,11,3,9,8,7,2,0};
var nums = numbers.Skip(4);

foreach(var n in nums)
{
Console.Write(n+””);
}

A.    9 8 6 7 2 0
B.    5 4 11 3 9 8
C.    5 4 11 3
D.    None

Right Answer: A

Que.14. int[] A= {0,2,4,5,6,8,9};
int[] B = {1,3,5,7,8};

IEnumerable<int> nums = A.Except(B);

foreach(var n in nums)
{
Console.Write(n+ “”);
}

A.    0,2,4,5,6,8,9
B.    1,3,5,7,8
C.    0,2,4,6,9
D.    All of the above

Right Answer: C

Que.15 Choose the correct one.
int[] numbers = {9,4,1,3,8,6,7,2,1};

var nums = numbers.Take(3);
foreach(var n in nums)
{
Console.WriteLine(n);
}

A.    7 2 1
B.    9 4 1
C.    3 8 6
D.    1 4 9

Right Answer: B

Que.16. int[] A = {0,2,4,56,8};
int[] B = {1,3,5,7,8};

var nums = A.Unioin(B);
foreach(var n in nums)
{
Consol.Write(n+ “”);
}
A.    0 2 4 5 6 8 1 3 5 7 8
B.    0 2 4 5 6 8 1 3 7
C.    0 1 2 3 4 5 6 7 8
D.    None

Right Answer: B

Que.17. Which of the following are correct?
1.    An interface can be instantiated directly.
2.    Interfaces can contain constructor.
3.    Interfaces contain no implementation of methods.
4.    Classes and structs can implement more than one interface.
5.    An interface itself can inherit from multiple interfaces.

A.    3,4,5
B.    1,2,3
C.    2,3,4
D.    All are correct

Right Answer: A

Que.18. From the following which works client side?
A.    ViewState
B.    HiddenField
C.    ControlState
D.    All Choices are correct

Right Answer: D

Que.19. namespace A
{
class MyClass
{
public void fun()
{
Console.WriteLine(“C # is fun”);
}
}
Namespace B
{
class MyClass
{
public void fun()
}
Console.WriteLine(“C # is interesting”);
}
}
}
}

Consider the above code what will be the output of the following program

class Program
{
Static void Main(string[] args)
{
A.B.MyClass obj = new A.B.MyClass();

Obj.fun();
}
}

A.    C # is interesting
B.    C # is fun
C.    Compile time error
D.    None

Right Answer: A

Que.20. From the following which works server side?
A.    ViewState
B.    HiddenField
C.    Application and session
D.    All choices are correct

Right Answer: C


Wednesday, May 29, 2013

Software Testing MCQ Test – 1

Que.1. Defects are less costly if detected in which of the following phases
A.    Coding
B.    Design
C.    Requirements Gathering
D.    Implementation

Right Answer: C

Que.2. User Acceptance testing is
A.    White box testing
B.    Black box testing
C.    Gray box testing
D.    None of the above

Right Answer: B

Que.3. Error guessing is a
A.    Test verification techniques
B.    Test execution techniques
C.    Test control management techniques
D.    Test data management technique

Right Answer: D

Que.4. Histogram refers to
A.    Bar chart
B.    Run chart
C.    Pareto diagram
D.    Correlation diagram

Right Answer: A

Que.5. Pareto principle advocates
A.    20-80 rule
B.    80-20 rule
C.    40-60 rule
D.    60-40 rule

Right Answer: B

Que.6. Which one is not Structural Testing?
A.    Regression
B.    Parallel
C.    Acceptance
D.    Stress

Right Answer: C

Que.7. Testing comes under which category of cost of quality?
A.    Preventive
B.    Appraisal
C.    Failure
D.    None of the above

Right Answer: B

Que.8. Which of the following is not true about Incremental testing?
A.    Top-Down approach can be used
B.    Use of stubs or drivers are required
C.    All modules need to be completed prior to testing
D.    Bottom – up approach is also possible

Right Answer: C

Que.9. Which of the following is not a part of test plan?
A.    Scope
B.    Mission
C.    Objective
D.    Risk

Right Answer: B

Que.10. Which one is not Statistical Tool?
A.    Cause and effect Graphing
B.    Stratification
C.    Run Chart
D.    Regression Analysis

Right Answer: A

Que.11. The ‘v’ represent the following term:
A.    Verification and validation
B.    Static testing and Dynamic testing
C.    Black box testing and white box testing
D.    Software development process and software testing process

Right Answer: D

Que.12. Function point is a measure of
A.    Effort
B.    Complexity
C.    Usability
D.    Size

Right Answer: D

Que.13. You are told to prepare a report on the most commonly occurring product defects. You review the software defect reports, which categories the defects of coding errors, requirement errors, documentation errors, etc. The best tool to report this information is
A.    A histogram
B.    A pareto diagram
C.    A cause and effect diagram
D.    A scatter plot

Right Answer: A

Que.14. A statistical technique to assess, monitor and maintain the stability of a process is
A.    Pareto chart
B.    Control chart
C.    Run chart
D.    Histogram

Right Answer: B

Que.15. The two types of incremental testing approaches are top down and bottom up approach.
A.    True
B.    False

Right Answer: A

Que.16. If the measurement taken by the two people are same refers to the terms as
A.    Reliability
B.    Validity
C.    Calibration
D.    Ease of use and simplicity

Right Answer: A

Que.17. Test Readiness review is conducted by the
A.    Project manager
B.    Test manager
C.    Quality assurance personnel
D.    User/Customer

Right Answer: B

Que.18. To which phase will training cost fall?
A.    Failure
B.    Prevention
C.    Build
D.    Appraisal

Right Answer: B

Que.19. You are performing a test to see that it complies with the user requirement that a certain field be populated by using a drop down box containing a list of values. What kind of testing are you doing?
A.    White box testing
B.    Black box testing
C.    Load testing
D.    Regression testing

Right Answer: B

Que.20. Which is the reputed testing standard?
A.    M Bridge awards
B.    QAI
C.    ISO
D.    Microsoft

Right Answer: C

Data Structure MCQ Test – 1

Que.1. Can linked list be implemented using arrays?
A.    Yes
B.    No

Right Answer: A

Que.2. On which principle does stack work?
A.    FILO
B.    FIFO
C.    LILO
D.    Both a and c above

Right Answer: A

Que.3. An empty list is the one which has no
A.    nodes
B.    data
C.    both a and b above
D.    address

Right Answer: C

Que.4. In a heap, element with the greatest key is always in the ______________ node
A.    leaf
B.    root
C.    first node of left sub tree
D.    first node of right sub tree

Right Answer: B

Que.5. A _____________ tree is tree where for each parent node, there is only one associated child node
A.    balanced binary tree
B.    rooted complete binary tree
C.    complete binary tree
D.    degenerate tree

Right Answer: D

Que.6. Items in a priority queue are entered in a _______________ order
A.    random
B.    order of priority
C.    as and when they come
D.    none of the above

Right Answer: A

Que.7. A tree cannot contain cycles
A.    False
B.    True

Right Answer: B

Que.8. In graphs, A hyperedge is an edge that is allowed to take on any number of _____________
A.    Vertices
B.    Edges
C.    Both a and b above
D.    Labels

Right Answer: B

Que.9. Key value pairs is usually seen in
A.    Hash tables
B.    Heaps
C.    Both a and b
D.    Skip list

Right Answer: A

Que.10. Breadth First Search is used in
A.    Binary trees
B.    Stacks
C.    Graphs
D.    Both a and c above

Right Answer: C

Que.11. Which of the following ways below is a pre order traversal?
A.    Root->left sub tree->right sub tree
B.    Root-> right sub tree ->left sub tree
C.    right sub tree->left sub tree->Root
D.    left sub tree->right sub tree->Root

Right Answer: A

Que.12. What is the pecularity of red blac trees?
A.    In red-black trees, the root do not contain data.
B.    In red-black trees, the leaf nodes are not relevant and do not contain data.
C.    In red-black trees, the leaf node are relevant but do not contain data.
D.    Both a and c above

Right Answer: B

Que.13. AVL trees have a faster ________________
A.    Insertion
B.    Deletion
C.    Updation
D.    Retrival

Right Answer: D

Que.14. Which of the following statements hold true for binary trees?
A.    The left subtree of a node contains only nodes with keys less than the node’s key
B.    The right subtree of a node contains only one nodes with key greater than the node’s key.
C.    Both a and b above
D.    Noth left and right subtree nodes contains only nodes with keys less than the node’s key

Right Answer: C

Que.15. Which of the following linked list below have last node of the list pointing to the first node?
A.    circular doubly linked list
B.    circular linked list
C.    circular singly linked list
D.    doubly linked list

Right Answer: C

Que.16. Which of the following ways below is a In order traversal?
A.    Root->left sub tree->right sub tree
B.    Root-> right sub tree ->left sub tree
C.    right sub tree->left sub tree->Root
D.    left sub tree->right sub tree->Root

Right Answer: D

Que.17. Can stack be describe as a pointer?
A.    Yes
B.    No

Right Answer: A

Que.18. The time required in best case for search operation in binary tree is
A.    O(n)
B.    O(log n)
C.    O(2n)
D.    O(log 2n)

Right Answer: B

Que.19. In ______________ tree, the heights of two child subtree of any node differ by at most one
A.    Binary tree
B.    Red black tree
C.    Splay tree
D.    AVL tree

Right Answer: D

Monday, May 27, 2013

Computer Basics MCQ Test – 1

Que.1. condensing output data to exhibit specific information is
A.    calculating
B.    recording
C.    merging
D.    summarizing

Right Answer: D

Que.2. ASCII stands for
A.    American Stable Code for International Interchange
B.    American Standard Case for Institutional Interchange
C.    American Standard Code for Information Interchange
D.    American Standard Code for Interchange Information

Right Answer: C

Que.3. Which is considered a direct entry input device?
A.    Optical scanner
B.    Mouse and digitizer
C.    Light pen
D.    All of the above

Right Answer: D

Que.4. One millisecond is
A.    1 second
B.    10th of a seconds
C.    1000th of a seconds
D.    10000th of a seconds

Right Answer: C

Que.5. The number of characters that can be stored in given physical space is
A.    Word length
B.    Byte
C.    Data density
D.    Field

Right Answer: C

Que.6. A plastic card similar to credit card but having some memory and a microprocessor embedded within it is
A.    Punched paper tape
B.    Chip card
C.    Card punch
D.     Magnetic tape

Right Answer: A

Que.7. Which number system is commonly used as a shortcut notation for groups of four binary digits?
A.    Binary
B.    Decimal
C.    Octal
D.    Hexadecimal

Right Answer: D

Que.8. The use of spooler programs and/or ____________ Hardware allows personal computer operators to do the processing work at the same time a printing operation is in process
A.    Registered mails
B.    Memory
C.    CPU
D.    Buffer

Right Answer: D

Que.9. A byte consist of
A.    One bit
B.    Four bits
C.    Eight bits
D.    Sixteen bits

Right Answer: C

Que.10. Which is an item of storage medium in the form of circular plate?
A.    Disk
B.    CPU
C.    Printer
D.    ALU

Right Answer: A

Que.11. The personnel who deals with the computer and its management put together are called
A.    Software
B.    Human ware
C.    Firmware
D.    Hardware

Right Answer: B

Que.12. A disk storage medium in the form of assembly containing a single rigid magnetic disk permanently is
A.    Fixed disk
B.    Disk cartridge
C.    Card punch
D.    Card reader

Right Answer: B

Que.13. A directly accessible appointment calendar is feature of a ___________ resident package
A.    CPU
B.    Memory
C.    Buffer
D.    ALU

Right Answer: B

Que.14. A group of magnetic tapes, videos or terminals usually under the control of one master is
A.    Cylinder
B.    Surface
C.    Track
D.    Cluster

Right Answer: D

Que.15. Computer professionals working in a computer center are:
A.    Software
B.    Firmware
C.    Hardware
D.    Humanware

Right Answer: D

Que.16. Which of the following memories allows simultaneous read and write operations?
A.    ROM
B.    RAM
C.    EPROM
D.    None of the above

Right Answer: B

Que.17. A type of core store that has a lower access time than the devices used for working store in the same processor is known as
A.    Core memory
B.    Buffer
C.    Fast core
D.    Address register

Right Answer: D

Que.18. A term used to describe interconnected computer configuration is
A.    Multiprogramming
B.    Modulation
C.    Multiprocessing
D.    Micro program sequence

Right Answer: A

Que.19. To locate a data item for storage is
A.    Field
B.    Feed
C.    Database
D.    Fetch

Right Answer: D

Que.20. An error in computer data is called
A.    Chip
B.    Bug
C.    CPU
D.    Storage device

Right Answer: B

Software Engineering MCQ Test – 1

Que.1. What are KPAs and how many KPAs should be satisfied for a company to achieve CMMLs
A.    Key project areas,17
B.    Key project areas, 18
C.    Key process areas, 17
D.    Key process areas, 18

Right Answer: D

Que.2. Which of the following is not a characteristic of scrum model of product development?
A.    Incremental development
B.    Agile nature
C.    Stable requirements
D.    Time-boxed scheduling

Right Answer: C

Que.3. Which of the following is a non functional requirement of a web based application?
A.    When the user clicks a “read me” link, the color of the link should change from blue to pink
B.    When the user clicks a “read me” link, the next page should be opened within 5 seconds
C.    When the user clicks a “read me” links, the mouse over should show the target page title in a tool tip
D.    When the user clicks a “read me” links, the read me page should load successfully without errors

Right Answer: B

Que.4. Incremental funding methodology (IFM) takes into consideration all but
A.    Project ROI
B.    NPV
C.    Opportunity cost
D.    Start up cost

Right Answer: C

Que.5. CMM is
A.    Company maturity model
B.    Capability maturity model
C.    Configuration maturity model
D.    Company management model

Right Answer: B

Que.6. Which of the following is not a process important model
A.    CMMI
B.    ISO 9000
C.    ISO 15504
D.    None of the above

Right Answer: D

Que.7. A scrum is actually a
A.    Software process model which is agile in nature
B.    A team pack in rugby where everyone in the pack act together to move the ball down the field
C.    None of the above
D.    Both a and b

Right Answer: D

Que.8. Which of the following is not a valid software engineering architecture?
A.    White board architecture
B.    Client server architecture
C.    Layered hierarchy
D.    Peer to peer architecture

Right Answer: A

Que.9. Testing robustness of software system by making it fail is.
I.    Stress test
II.    Crash test
III.    Metallographic test
IV.    Hardness test

A.    I
B.    I and II
C.    I and III
D.    All choices are correct

Right Answer: D

Que.10. CMMi has an interactive lifecycle when compared to CMM.
A.    True
B.    False

Right Answer: A

Que.11. Post implementation review is
A.    reviewing the risk baseline
B.    reviewing the traceability matrix
C.    reviewing the impact on customers
D.    None of the above

Right Answer: B

Que.12. RUP and PSP stands for
A.    Realtime unified process and Project software process
B.    Realtime unified process and Personal software process
C.    Rational Unified Process and Project software process
D.    Rational Unified Process and Personal software process

Right Answer: D

Que.13. A test plan may contain all but
A.    traceability screenshots
B.    test data
C.    test set
D.    traceability requirements

Right Answer: A

Que.14. Which of the following models follow a purity sequential approach
A.    Waterfall model
B.    Spiral model
C.    Iterfall development
D.    Iterative development

Right Answer: A

Que.15. Which of the following is not a design tool?
A.    Simple SUMI
B.    Rational Rose
C.    Rhapsody
D.    Rational Robot

Right Answer: D

Que.16. Configuration management is
A.    management of the config file in operating system
B.    identifying and controlling changes to the configuration of a system
C.    process of configuring the management processes and practices
D.    None of the above

Right Answer: B

Que.17. __________ enhances performance and functionality of the software after delivery
A.    re-design
B.    re-engineering
C.    maintenance
D.    post checking

Right Answer: C

Que.18. Which of the following models combine the features of waterfall model and prototyping model:
A.    Modified waterfall model
B.    Spiral model
C.    Iterfall development
D.    Iterative development

Right Answer: B

Que.19. Which of the following is not a graphical language for software design:
A.    UML
B.    DML
C.    EEML
D.    SysML

Right Answer: B

Que.20. Effective requirement document is one which does not
A.    show ambiguity
B.    refer to high level documents
C.    have traceability requirements
D.    depict data flow diagrams

Right Answer: A

Saturday, May 25, 2013

Networking MCQ Test – 1

Que.1. A network point that provides entrance into another network is called as ____________
A.    Node
B.    Gateway
C.    Switch
D.    Router

Right Answer: B

Que.2. What is the difference between ring and bus topology?
A.    In Ring all are connected with another in a loop while in bus they are connected to a central cable
B.    In Ring all are connected with another loop while in bus they are connected to a central cable
C.    In bus all nodes are connected with another in a loop while in star they connected to a central node
D.    In Bus all nodes are connected with another loop while in star they are connected to a central cable

Right Answer: A

Que.3. TELNET used ____________ protocol for data connection
A.    TCP
B.    UDP
C.    IP
D.    DHCP

Right Answer: A

Que.4. UDP in an unreliable protocol
A.    True
B.    False

Right Answer: A

Que.5. Token Ring is a data link technology for?
A.    WAN
B.    MAN
C.    LAN

Right Answer: C

Que.6. Which of the following protocol below are suited for email retrieval?
A.    POP3
B.    IMAP
C.    FTP
D.    Both a and b  above
Right Answer: D

Que.7. MAC addressing works in data link layer  while IP addressing work in network layer.
A.    True
B.    False

Right Answer: A

Que.8. A stream socket provides ___________ communications between a client and server.
A.    One way
B.    Two way

Right Answer: B

Que.9. ___________ is added to data packet for error detection.
A.    both b and c
B.    checksum bit
C.    error bit
D.    parity bit

Right Answer: D

Que.10. MAC addresses are also known as?
A.    Hardware address
B.    Physical address
C.    Both a and b above
D.    IP address

Right Answer: C

Que.11. Which of the following protocols below work in application layer?
A.    POP
B.    PPP
C.    FTP
D.    Both a and d above

Right Answer: D

Que.12. How can we examine the current routing table in command prompt?
A.    using routestart
B.    using netstart
C.    using netset
D.    either a or b

Right Answer: B

Que.13. IP4 is more commonly used than IPv6?
A.    True
B.    False

Right Answer: A

Que.14. What is the size of an IP address?
A.    64 bit
B.    128 bit
C.     16 bit
D.    32 bit

Right Answer: D

Que.15. Ping command works on which protocol?
A.    ICMP
B.    TCP
C.    IP
D.    UDP

Right Answer: A

Que.16. What is the port number for HTTP?
A.    25
B.    80
C.    21
D.    65

Right Answer: B

Que.17. From the position below, which suits best for MODEM?
A.    a device that modulates an analog carrier signal to encode digital information
B.    a device modulates a digital carrier signal to encode analog information
C.    a device that modulates an analog carrier signal to decode digital information
D.    a device that modulates a digital carrier signal to decode analog information

Right Answer: A

Que.18. Both ping and trancert are used to find If the compiler is in network.
A.    True
B.    False

Right Answer: B

Que.19. Transport layer of OSI model lies between network and __________ layer.
A.    Application
B.    Data link
C.    Session
D.    Presentation

Right Answer: C

Que.20. All IP addresses are divided into network address and host address
A.    True
B.    False

Right Answer: A

LINUX MCQ Test – 1

Que.1. Which of the following below are true functionalities of shell?
A.    Authenticates user
B.    Interprets commands
C.    Allocates time and memory to programs
D.    Only a and b

Right Answer: B

Que.2. A process can run only in the background
A.    True
B.    False

Right Answer: B

Que.3. Which of the following below are true functionalities of Kernel?
A.    Allocates time and memory to programs
B.    Authenticates user
C.    Interprets commands
D.    All choices are correct

Right Answer: A

Que.4. To implement new application on IBM z/10. Which of the following options need to be considered if it to be implemented in Linux?
A.    IBMz/OS outperforms Red Hat Linux in commercial workloads
B.    IBMz/OS is more expensive, Linux is shareware
C.    Red Hat Linux does not support all devices supported by IBMz/OS   
D.    z/OS is supported by IBM SupportLine, whereas Red Hat Linux can only be supported by Red Hat

Right Answer: C

Que.5. A process is identified by a unique
A.    Pid
B.    Id
C.    processed
D.    proid

Right Answer: A

Que.6. Which command reduces the size of a file?
A.    pzip
B.    gcat
C.    pgcat
D.    gzip

Right Answer: D

Que.7. Which of the following has greater market share of Linux SW/HW
A.    Linux on z10
B.    Linux HP integrity server
C.    Linux on AS/400 servers locate
D.    Linux on DELL  Xeon

Right Answer: A

Que.8.  Which of the following is the BEST way to set up SSH(Secure Shell) for communicating between System without needing passwords?
A.    Use ssh-keygen for generating public-private keys.
B.    Disable passwords on specific accounts that will use SSH.
C.    Both A and B
D.    None of the above

Right Answer: A

Que.9. Which of the following commands can be run to remove all the rules in an iptable table?
A.    iptable-L
B.    iptable-A
C.    iptable-F
D.    iptable-delete

Right Answer: C

Que.10. Which command is used to see the online manual?
A.    Man
B.    manual
C.    *man
D.    %man

Right Answer: A

Que.11. The head command writes the first ____________ lines of a file to screen.
A.    Five
B.    Twenty
C.    Ten
D.    Fifteen

Right Answer: C

Que.12. Which command is used to clear the screen?
A.    % clear
B.    clear
C.    clrscr
D.    either a or c

Right Answer: B

Que.13. Which command is used to find what is in your home directory?
A.    % List
B.    % Is
C.    % home
D.    Either a or c

Right Answer: B

Que.14. Pipe symbol is represented by
A.    ||
B.    |
C.    ^
D.    $

Right Answer: B

Que.15.  What is the shortcut to the login directory?
A.    shift+cd
B.    cd+enter key
C.    alt+ctrl+cd
D.    ctrl+cd

Right Answer: B

Que.16. What is used to search files for specified words or patterns?
A.    Less
B.    Srch
C.    %src
D.    Grep

Right Answer: D

Que.17.  cd home to get back to your home-directory?
A.    True
B.    False

Right Answer: B

Que.18. > symbol is used to redirect the output of a command
A.    True
B.    False

Right Answer: A

Que.19. Which character is used to match exactly one character?
A.    |
B.    *
C.    ^
D.    ?

Right Answer: D
Que.20. The hierarchy of a series of directories branching in a user system starts from
A.    home
B.    root
C.    /home
D.    /root

Right Answer: C

Thursday, May 23, 2013

SQL Server MCQ Test – 1

Que.1. Can you use the UPDATE and SELECT clauses in one SQL statement?
A.    You can if you use nested SQL statement
B.    You can’t
C.    You can use UPDATE and SELECT clause together, even if you don’t have nested SQL statements

Right Answer: A

Que.2. Can we temporarily disable a login name?
A.    Yes
B.    No

Right Answer: A

Que.3. Permanent setting of specific server characteristics is done by trace tags
A.    False
B.    True

Right Answer: A

Que.4. Which of the following statements is/are false for Extended events in sql server 2008?
A.    Enhanced event handling system in SQL Server
B.    Both b and c below
C.    Used for problem identification or problem trouble shooting
D.    An architecture that is  not very scalable, highly configurable

Right Answer: D

Que.5. When SQL server is installed, which of the following database are created by default?
A.    Master
B.    Model
C.    Both a and b
D.    Root

Right Answer: C

Que.6. Which of the following statements is/are true for SQL server?
A.    SQL Server has Logical Architecture and Physical Architecture
B.    Both a and c
C.    SQL Server is compatible with the structured query language and has rich for XML
D.    SQL Server is a DBMS, a complete database.

Right Answer: B

Que.7. What is the difference between the WHERE and HAVING SQL clauses?
A.    The WHERE and the HAVING clauses are identical
The HAVING SQL clause condition(s) is applied to all rows in the result set before the
B.    WHERE clause is applied (if parent). The WHERE clause is used only with SELECT SQL statements and specifies a search condition for an aggregate or a group.
C.    HAVING clause is applied (if parent). The HAVING clause is used only with SELECT SQL statements and specifies a search condition for an aggregate or a group

Right Answer: C

Que.8. What is the syntax for creation new login on the SQL server?
A.    USE LOGIN login_id WITH PASSWORD password
B.    CREATE LOGIN login_id WITH USE password
C.    CREATE LOGIN login_id USE password
D.    CREATE LOGIN login_id WITH PASSWORD password

Right Answer: D

Que.9. What is the purpose of MEARGE in sql server 2008?
A.    Merge statement allows a single statement for INSERT, DELETE and UPDATE a row that depends on a condition
B.    Merge statement allows multiple statements for INSERT, DELETE and UPDATE a row that depends on a condition
C.    Merge statement allows a single statement for INSERT, DELETE and UPDATE a row that independent on a condition
D.    Merge statement allows multiple statements for INSERT, DELETE and UPDATE a row that is independent on a condition

Right Answer: A

Que.10. SQL Server 2000 always returns the result of a FOR XML query directly to the client in XML form
A.    True
B.    False

Right Answer: B

Que.11. Dynamic Page Repair is a type of database mirroring.
A.    False
B.    True

Right Answer: A

Que.12. CPUs can dynamically be added to a running system, by using _________ feature
A.    Cold Add CPU
B.    Hot Add CPU
C.    Dynamic add CPU
D.    Passive add CPU

Right Answer: B

Que.13. The identifiers in SQL can have a character range from?
A.    1 to 100
B.    1 to 128
C.    1 to 64
D.    1 to 132

Right Answer: B

Que.14. Which of the following rules below are true to use the ROWGUICOL property to define a globally unique identifier column?
A.    A table can have only one ROWGUICOL column
B.    A ROWGULCOL column must not be defined by using the unique identifier data type.
C.    Both a and c
D.    NEWID function to generate a globally unique value.

Right Answer: A

Que.15. A column with an optimized storage for null values is known as ________ column
A.    spatial
B.    optimum
C.    dense
D.    sparse

Right Answer: D

Que.16. ______________ is a feature that is used for tracking the changes on a table
A.    Change schema Capture
B.    Change table Capture
C.    Change Data Capture
D.    Change database Capture

Right Answer: C

Que.17. ____________ helps to restore the database to the point where it failed.
A.    File backup
B.    Differential Backups
C.    File log
D.    Transaction log

Right Answer: D

Que.18. How do we delete a login?
A.    DLETE LOGIN login_name
B.    DROP LOGIN login_name
C.    A login cannot be deleted but only diabled
D.    DISABLE LOGIN login_name

Right Answer: B

Que.19. Which of the following statements is/are false for Declarative Management Framework (DMF) in sql server 2008?
A.    System for managing the instance of SQL Server 2008
B.    SQL Server does not enforce to define the policies by using Management Studio
C.    Both b and d
D.    A policy can be designed for allowing the use of  unauthorized applications

Right Answer: C

Que.20. Remote BLOB storage is a _____________ API which reduces the application building complexity
A.    Server-side
B.    Client-side

Right Answer: B

CSS MCQ Test – 1

Que.1. A navigation bar needs standard HTML as a base
A.    True
B.    False

Right Answer: A

Que.2. The ____________ selector is used to specify a style for a single, unique element
A.    Id
B.    class
C.    text
D.    Bit

Right Answer: A

Que.3. Which of the following ways below is correct to write a CSS?
A.    p {color:red; text-align:center};
B.    p {color:red; text-align:center}
C.    p {color:red; text-align:center;}
D.    p (color:red;text-align:center;)

Right Answer:C

Que.4. The ____________ property specifies which sides of an element other floating elements are not allowed.
A.    cleared
B.    clear
C.    float
D.    Both A and B  above

Right Answer: B

Que.5. Which of the below is the correct way to set a background image?
A.    body {background-image:url(paper.gif);}
B.    body {background-image:url(‘paper.gif’)};
C.    body {background-image:url(‘paper.gif’)}
D.    body {background-image:url(‘paper.gif’);}

Right Answer: D

Que.6. The ___________ property specifies the stack order of an element
A.    d-index
B.    s-index
C.    x-index
D.    z-index

Right Answer: D

Que.7. Block elements can be aligned by setting the left and right margins to “align”
A.    True
B.    False

Right Answer: B

Que.8. Which of the below is the correct way to set a font size?
A.    h2{font-size:200%;}
B.    h2{font-size:200px;}
C.    both a and b above
D.    h2{font-size:200;}

Right Answer: C

Que.9. Elements in CSS cannot be positioned unless the positioning property is set first
A.    True
B.    False

Right Answer: A

Que.10. What is CSS Float?
A.    allows other element to wrap around an element
B.    element can be pushed to the left to right
C.    both a and b above
D.    element can be pushed to any direction

Right Answer: C

Que.11. To specify table border in CSS, ____________ property is  used
A.    tbl-border
B.    table-border
C.    tb-border
D.    border

Right Answer: D

Que.12. _________ property can be used to Increase or decrease the space between words
A.    space
B.    word-spacing
C.    word-space
D.    Both b and c above

Right Answer: B

Que.13. Multiple external style sheets cannot be referenced inside a single HTML document
A.    True
B.    False

Right Answer: B

Que.14. element-width property can be used to set the width of an element
A.    True
B.    False

Right Answer: B

Que.15. The _________ property is mostly used to remove underline from links
A.    text-trans
B.    text-transformation
C.    text-decoration
D.    text-deco

Right Answer: C

Que.16. Which of the following statements is TRUE for CSS
A.    An external style sheet is ideal when the style is applied to many pages
B.    An inline style sheet should be used when a single document has a unique style
C.    Both A and B above
D.    An external style sheet can be written in HTML

Right Answer: A

Que.17. Which of the following statements is/are true?
A.    Hiding an element can be done by setting the display property to “none”
B.    Hiding an element can be done by setting visibility property to “hidden”
C.    Both A and B above
D.    Hiding an element can be done by setting block property to “hidden”

Right Answer: C

Que.18. The font-size value can be an absolute, or relative size
A.    True
B.    False

Right Answer: A

Que.19. ______________ property specifies an image to use as the background of an element
A.    backg-img
B.    backg-image
C.    background-img
D.    background-image

Right Answer: D

Que.20. ID name should not start with a number
A.    False
B.    True

Right Answer: B

Tuesday, May 21, 2013

C MCQ Test – 1

Que.1. Explain feature of stack.
A.    stack cannot reuse its memory
B.    All elements are of different data types
C.    All operations are at one end
D.    Any element can be accessed from it directly

Right Answer: C

Que.2. The compiler in C ignores all text from a _________ until then end of a line.
A.    /
B.    */
C.    **
D.    //

Right Answer: D

Que.3. What are the total number of keywords in C?
A.    30
B.    33
C.    32
D.    35

Right Answer: C

Que.4. What is the main difference between calloc() and malloc()?
A.    calloc() takes a single argument while malloc() needs two arguments
B.    malloc() takes a single argument while calloc()needs two arguments
C.    malloc() initializes the allocated memory to ZERO
D.    calloc() initializes the allocated memory to NULL

Right Answer: B

Que.5. rand() function returns a ___________ value
A.    float
B.    any type
C.    integer
D.    both a and c above

Right Answer: C

Que.6. Which of the following below is/are valid C keywords?
A.    integer
B.    int
C.    null
D.    both a and c above

Right Answer: B

Que.7. From which of the following libraries below, calloc() belongs to?
A.    stdlib.h
B.    malloc.h
C.    calloc.h
D.    both a and b above

Right Answer: D

Que.8. What is the purpose of getc() for?
A.    read a character from STDIN
B.    read a character from a file
C.    both a and b above
D.    read a character from an input of user

Right Answer: B

Que.9. What will be the output of the following program?
float x = 3.3;
int i;
i = (int) x;
print i;
A.    3
B.    3.3
C.    3.0
D.    3.00

Right Answer: A

Que.10. Exit() is same as return?
A.    Yes
B.    No

Right Answer: B

Que.11. With every use of a memory allocation function, what function should be used
To release allocated memory which is no longer needed?
A.    unallocated()
B.    dropmem()
C.    dealloc()
D.    release()
E.    free()

Right Answer: E

Que.12. What would be the output of the following?
main()
{
int val1=1234;
int val2=01234;
printf(“%d %d”, val1, val2);
}
A.    1234 1234;
B.    1234 01234;
C.    1234 668
D.    1234 688

Right Answer: C

Que.13¬ ¬¬__________ will immediately jump to the end of the current block of code
A.    continue
B.    Exit
C.    Goto
D.    break

Right Answer: E

Que.14. int testarray[3][2][2] = {
1,2,3,4,5,6,7,8,9,10,11,12}; What value does testarray[2][1][0] in the sample code
Above contain?
A.    3
B.    5
C.    7
D.    9
E.    11

Right Answer: E

Que.15. int I,j;
int ctr = 0;
int myArray[2][3];
for (i=0;i<3;i++)
for (j=0;j<2;j++)
{
myArray[j][i]=ctr;
++ctr;
}
What is the value of myArray[1][2]; in the sample code above?
A.    1
B.    2
C.    3
D.    4
E.    5

Right Answer: E

Que.16. int a=10,b;
v=a++ + ++A;
printf(“%d, %d, %d, %d”, b,a++,a,++a);
what will be the output when following code is executed
A.    12,10,11,13
B.    22,10,11,13
C.    22,11,11,11
D.    12,11,11,11
E.    22,13,13,13

Right Answer: E

Que.17. What would be the output of the following?
main(){
char *str=”eMississippiz”;
printf(“%s”,str);
}
A.    eMississippiz
B.    eMissi ssippiz
C.    Mississippi
D.    Missi

Right Answer: A

Que.18. In C, what is the difference between a declaration and definition of a variable?
A.    Both can occur multiple times, but a declaration must occur first.
B.    Both can occur multiple times, but a definition must occur first.
C.    A definition occurs once, but declaration may occur many times.
D.    A declaration occurs once, but definition may occur many times.

Right Answer: C

Que.19. Which one of the following functions is the correct choice for moving blocks of
binary data that are of arbitrary size and position in memory?
A.    memcpy()
B.    memset()
C.    strcpy()
D.    strcpy()
E.    memove()

Right Answer: E

Que.20. Can getch() be used to echo the input?
A.    Yes
B.    No

Right Answer: B

C++ MCQ Test – 1

Que.1. Which of the following cannot be inherited from the base class?

A.    Constructor
B.     Friend
C.    Both a and b cannot be inherited
D.    Both a and b can be inherited

Right Answer: C

Que.2. class derived: public base1, public base2{} is an example of

A.    Polymorphic inheritance
B.     Multilevel inheritance
C.    Hierarchical inheritance
D.    Multiple inheritance

Right Answer: D

Que.3. Which of the following is a valid destructor of the class name “Country”

A.    int ~Country()
B.     void Country()
C.    int ~Country(Contry obj)
D.    void ~Country()

Right Answer: D

Que.4. class Example {

Public: int a,b,c;
Example () {a=b=c=1 ;} // Constructor 1
Example (int a) {a=a; b=c=1;} // Constructor 2
Example (int a, int b) {a=a; b=b; c=c;} // Constructor 3
Example (int a, int b, int c){ a=a; b=b; c=c;} // Constructor 4 }
In the above example of constructor overloading, the following statement will call which
constructor
Example obj = new Example (1,2,3.3)

A.    Constructor 2
B.     Constructor 4
C.    Constructor 1
D.    Type mismatch error

Right Answer: B

Que.5. If a class x needs to be derived from a class y, which of the following ways is
Correct to do so?

A.    Class x: public y
B.     Class y : public x
C.    Class x derives public y
D.    Class y derives public x

Right Answer: A

Que.6. A class cannot inherit members from more than one class

A.    True
B.     False

Right Answer: B

Que.7.  Which of the following is not true about preprocessor directives

A.    They begin with a hash symbol
B.     They are processed by a preprocessor
C.    They from an integral part of the code
D.    They have to end with a semi colon

Right Answer: D

Que.8. The output of this program is

int
main () {
cont<<”Hello World”
return 0;
}

A.    Hello World
B.     Syntax error
C.    0
D.    Hello World!

Right Answer: B

Que.9. Can inline functions be used to improve performance?

A.    Yes
B.     No
C.    Yes, depends on the situation
D.    Both a and b

Right Answer: D

Que.10. If a member needs to have unique value for all the objects of that same class,
declare the member as

A.    Global variable outside class
B.     Local variable inside constructor
C.    Static variable inside class
D.    Dynamic variable inside class

Right Answer: B

Que.11. int a = 10;

Void main()
{
int a = 20;
count <<a<<::a;
}
The output of this program is

A.    Syntax error
B.     10 20
C.    20 10
D.    20 20

Right Answer: C

Que.12. Write the output of the following;

char *mychar; // points to memory location 1000
short *mychart; // points to memory location 2000
long *mylong// points to memory location 3000
mychar++;
++myshort;
mylong++;
count<<mychar<<myshort<<mylong;

A.    1001 2001 3001
B.     1001 2002 3004
C.    1001 2001 3002
D.    1001 2002 3004

Right Answer: D

Que.13. Which one of the following is not a fundamental data type in C++

A.    float
B.     string
C.    Int
D.    Wchar_t

Right Answer: B

Que.14. What is the output of the following code snippet assuming user enters the side
as 4?
class square
{
Public:
double side1;
double area() {
double (side1*side1);
}
};
int main(){
double area1=0;
squre c1,c2;
count<<”Enter the length of the squre”<<endl;
cin>>c1.side;
cout<<”The area of  the square is : “<<c1.area1()<<endl;
return (0);
}

A.    16
B.     Will result in an error
C.    8
D.    12

Right Answer: B

Que.15. When class B is inherited from class A, what is the order in which the
constructor of those classes are called

A.    Class A first Class B next
B.     Class B first Class A next
C.    Class B’s only as it is the child class
D.    Class A’s only as it is the parent class

Right Answer: A

Que.16. Which one of the following is not a valid reserved keyword in C++

A.    Explicit
B.     Public
C.    Implicit
D.    Private

Right Answer: C

Que.17. Value of a in a = (b = 5, b + 5); is

A.    Junk value
B.     Syntax error
C.    5
D.    10

Right Answer: D

Que.18. A null pointer is nothing but a void pointer pointing to nowhere.

A.    True
B.     False

Right Answer: B

Que.19. Which of the following members do get inherited but become private members
in child class

A.    Public
B.     Private
C.    Protected
D.    All of the above

Right Answer: C

Que.20. What is a virtual member?

A.    A member of a friend class that can be redefined in its derived classes
B.     A member of a virtual class that cannot be redefined in its derived classes
C.    A member of a static class that can be redefined in its derived classes
D.    A member of a class that can be redefined in its classes

Right Answer: D

Sunday, May 19, 2013

MySQL MCQ Test – 1


Que.1. BLOB data type can have default column value.
A.    True
B.     False

Right Answer: B

Que.2. User() function return the current user name and ___________
A.    password
B.     host name
C.    both a and b above
D.    database name associated with the user

Right Answer: B

Que.3. Can DISTINCT command be used for more than one column?
A.    No
B.     Yes

Right Answer: B

Que.4. How much storage space does DATETIME require?
A.    4 bytes
B.     2 bytes
C.    8 bytes
D.    1 bytes

Right Answer: C

Que.5. Which of the following file extension is valid MyISAM file extension?
A.    .ism
B.     .myd
C.    .my
D.    .mys

Right Answer: B

Que.6. –i-am-a-dummy flag is used Make the MySQL engine refuse UPDATE and which other command?
A.    WHERE
B.     INSERT
C.    DELETE
D.    TRUNCATE

Right Answer: C

Que.7. On executing DELETE command, if you get an error “foreign key constraint” – what does it imply?
A.    Foreign key not defined
B.     Table is empty
C.    Connectivity issue
D.    Data is present in the other table

Right Answer: D

Que.8.  Can I call  a trigger directly from an application?
A.    Yes
B.     No

Right Answer: B

Que.9. What is a candidate key?
A.    Used to uniquely identify a row
B.     Alias for primary key
C.    Used to identify a column
D.    Alias for foreign key

Right Answer: A

Que.10. Which is the default order of sort in ORDER BY clause?
A.    Ascending
B.     Descending

Right Answer: A

Que.11. Can I define multiple unique constraints on a table?
A.    Yes
B.     No

Right Answer: A

Que.12. How can we get the number of records or rows in a table?
A.    Using COUNT
B.     Using NUM
C.    Using NUMBER
D.    Both a and c above

Right Answer: A

Que.13. Which of the following ways below are the correct way to get the current date?
A.    SELECT CURTIME();
B.     SELECT CURDATE();
C.    SLELCT CURRRENT_TIME()
D.    All of the above

Right Answer: D

Que.14. USE keyword is used to select a ____________________
A.    Table
B.     Column
C.    Database
D.    All of the above

Right Answer: C

Que.15. How do I find out all databases starting with `test to which I have access to ?
A.    SHOW DATABASES LIKE `%test%`;
B.     SHOW DATABASES LIKE `%test;
C.    SHOW DATABASES LIKE `’test’%’;
D.    SHOW DATABASES LIKE `%test%’;

Right Answer: D

Que.16. A view is nothing but a _____________ table or a stored query.
A.    Dynamic
B.     Real
C.    Virtual
D.    Static

Right Answer: C

Que.17. When do we use a HAVING clause?
A.    To limit the output of  a query
B.     To limit the output of a query using an aggregate function only
C.    When GROUP by is used
D.    Both a and c above

Right Answer: B

Que.18. An outer join requires each record in the two joined tables to have a matching record
A.    True
B.     False

Right Answer: B

Que.19. Enum values are stored according to their index numbers
A.    True
B.     False

Right Answer: A

Que.20. If an ENUM column is declared NOT NULL, its   default value is the first element of the list of allowed values.
A.    True
B.     False, ENUM column cannot be null
C.    False, its default value is the last element of the list of allowed values

Right Answer: A