COGNIZANT TECHNICAL QUESTIONS.pdf
COGNIZANT TECHNICAL QUESTIONS.pdf
ONE SHOT
Q.1 Retrieve all employees from the
"employees" table.
Query :-
SELECT * FROM employees;
Q.2 Find employees who earn more than the
average salary.
Query :-
SELECT name, salary
FROM employees
WHERE salary > (SELECT AVG(salary) FROM employees);
Q.3 Find all employees who do not have a
manager .
Query :-
SELECT * FROM employees WHERE manager_id IS NULL;
SQL TOPICS :-
• SQL DATA TYPES
• SQL WHERE CLAUSE
• SQL SUBQUERIES
• SQL JOINS
• SQL SYNTAX
Q.4 Write HTML code to create an ordered list with
three items: "Apple", "Banana", and "Cherry".
<ol>
<li>Apple</li>
<li>Banana</li>
<li>Cherry</li>
</ol>
Q.5 Write HTML code for a table with three
columns: "Name", "Age", and "Email". Add two
rows of sample data.
<table border="1">
<tr>
<th>Name</th>
<th>Age</th>
<th>Email</th>
</tr>
<tr>
<td>John Doe</td>
<td>25</td>
<td>[email protected]</td>
</tr>
<tr>
<td>Jane Smith</td>
<td>30</td>
<td>[email protected]</td>
</tr>
</table>
HTML TOPICS
• HTML Document Structure (<!DOCTYPE html>, <html>, <head>,
<body>)
• HTML Tags and Elements (<p>, <h1> - <h6>, <a>, <img>, <br>, <hr>)
• HTML Forms (<form>, <input>, <textarea>, <button>, <select>,
<option>)
• HTML Tables (<table>, <tr>, <td>, <th>, <thead>, <tbody>, <tfoot>)
• HTML Lists (<ul>, <ol>, <li>, <dl>, <dt>, <dd>)
CSS TOPICS :-
• CSS Selectors (element, class, id, grouping, universal, attribute)
• CSS Colors (rgb, rgba, hex, hsl)
• CSS Box Model (margin, border, padding, width, height)
• CSS Positioning (static, relative, absolute, fixed, sticky)
• CSS Flexbox (display: flex;, justify-content, align-items, flex-wrap, gap)
• CSS Transitions (transition, ease-in, ease-out, cubic-bezier)
JAVASCRIPT TOPICS :-
• Loops (for, while, do while, forEach, map)
• Functions (function declaration, function expression, arrow function)
• JavaScript Objects (Object.keys(), Object.values(), Object.entries())
• JavaScript Arrays (push(), pop(), shift(), unshift(), splice(), slice(),
filter(), reduce())
• Asynchronous JavaScript (setTimeout, setInterval, Promise,
async/await)
Q.6 Write an HTML snippet that creates a
navigation menu with three links: "Home", "About",
and "Contact".
<nav>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</nav>
Q.7 Write CSS to create a blue button that turns
green when hovered over.
button {
background-color: blue;
color: white;
padding: 10px 20px;
border: none;
cursor: pointer;
}
button:hover {
background-color: green;
}
Q.8 Write CSS to make a navigation bar stick to
the top of the page when scrolling.
nav {
position: sticky;
top: 0;
background-color: black;
color: white;
padding: 10px;
}
Q.9 Which of the following are the features of
cloud computing?
a) Security
b) Availability
c) Large Network Access
d) All of the mentioned
Q.10 Which of the following is the Cloud Platform
provided by Amazon?
a) AWS
b) Cloudera
c) Azure
d) All of the mentioned