0% found this document useful (0 votes)
9 views4 pages

IT New Question Paper

Bhhhhhhhhhhhhhhhhhhhbbbbhhhhhhhhhhhhhhgggghhhhb

Uploaded by

rushilchoubey08
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views4 pages

IT New Question Paper

Bhhhhhhhhhhhhhhhhhhhbbbbhhhhhhhhhhhhhhgggghhhhb

Uploaded by

rushilchoubey08
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Part 1: Multiple Choice Questions

1. What is the output of the following Java code snippet?

a) A
B
b) A
c) B
A
d) Error

2. What is the output of the following C++ code snippet?


a) Base
b) Derived
c) Compilation error
d) Runtime error

3. Which of the following is an NP-hard problem?


a) Travelling Salesman Problem (TSP)
b) Dijkstra's algorithm
c) Binary search
d) Bubble sort

4. In the context of database systems, which normal form ensures that every non-key
attribute is functionally dependent on the entire primary key and not just a part of it?
a) First Normal Form (1NF)
b) Second Normal Form (2NF)
c) Third Normal Form (3NF)
d) Boyce-Codd Normal Form (BCNF)

5. Which of the following is a property of functional programming languages?


a) Mutability of data
b) Emphasis on imperative programming
c) Lack of support for recursion
d) Immutable data

6. Which of the following is a property of a context-free grammar?


a) It can generate regular languages.
b) It can generate recursive languages.
c) It can be parsed by a pushdown automaton.
d) It can represent a programming language's syntax.

PART 2: Coding Based Questions


7. Write a program in python to determine if a given string s, which consists of only the
characters '(', ')', '{', '}', '[', and ']', is a valid combination of brackets or not. The string is
considered valid if it satisfies the following conditions:
● Each opening bracket must have a corresponding closing bracket of the same type.
● The opening and closing brackets must be in the correct order.
● Every closing bracket should be preceded by its corresponding opening bracket.
Example 1:
Input: s = "()[]{}"
Output: true
Example 2:
Input: s = "(]"
Output: false

8. Write a program in Java to determine if two given strings, s and t, are anagrams of each
other. Return true if they have the same set of characters, and false otherwise.
An anagram is a word or phrase formed by rearranging the letters of another word or phrase,
using all the original letters exactly once.
Example 1:
Input: s = "ready", t = "adyer"
Output: true
Example 2:
Input: s = "bat", t = "bar"
Output: false
9. Write a program in Java to find the subarray with the largest sum, and return its sum. An
array nums is given for you.
Example:
Input: nums = [5,4,-1,7,8]
Output: 23
Explanation: The subarray [5,4,-1,7,8] has the largest sum 23.

10. Write a program to print the following pattern:

Part 3: Short Essay Question


How has Blockchain paved the way for the impending growth of NFTs? Compare and
contrast the platform’s efficacies.
(Note: Do not use AI tools like ChatGPT or BARD for solutions of MCQ, Coding-based,
and Essay questions. We have AI-plag detector and if solutions are found to be taken from
AI. The candidate will be rejected without any further evaluation)

You might also like