

MCQOPTIONS
This section includes 1698 Mcqs, each offering curated multiple-choice questions to sharpen your General Awareness knowledge and support exam preparation. Choose a topic below to get started.
1651. |
What does the following code display while execution?
class Program { static void Main(string[] args) { int ch; HttpWebRequest req = (HttpWebRequest) WebRequest.Create("http://www.McGraw-Hill.com"); HttpWebResponse resp = (HttpWebResponse) req.GetResponse(); Stream istrm = resp.GetResponseStream(); for (int i = 1 ; ;i++) { ch = istrm.ReadByte(); if (ch == -1) break; Console.Write((char)ch); if ((i % 400) == 0) { Console.Write(" nPress Enter."); Console.ReadLine(); } } resp.Close(); } } |
A. | Html |
B. | Text |
C. | Html/text |
D. | Text/html |
Answer» E. | |
1652. |
Correct output for the given C#.NET code is ?
static void Main(string[] args) { string s1 = "Delhi"; string s2; s2 = s1.Insert (6, "Jaipur"); Console.WriteLine(s2); } |
A. | DelhJaipuri |
B. | Delhi Jaipur |
C. | Delhi |
D. | DelhiJaipur |
Answer» E. | |
1653. |
Select the output for given string ?Enter a String:BOMBAY.
|
A. | BOMBA |
B. | YABMOB |
C. | BOMAYB |
D. | YABMO |
Answer» C. BOMAYB | |
1654. |
Select the appropriate set of code for conversion of string to hexa form.
static void Main(string[] args) { string teststring = "MIKA@?&"; string hex = ConvertstringToHex(teststring, system.Text.Encoding.Unicode); Console.WriteLine(hex); } a) static string ConvertstringToHex(string input, system.Text.Encoding encoding) { string Bytes = encoding.GetBytes(input); string Builder sbBytes = new Builder sbBytes(); for each (byte 'b' in StringBytes) { sBytes.AppendFormat("{0:x2}", b); } return sbBytes.Tostring(); } b) static string ConvertstringToHex(string input, system.Text.Encoding encoding) { char[]string Bytes = encoding.GetBytes(input); string Builder sbBytes = new Builder sbBytes(StringBytes.Length*2); for each (byte 'b' in StringBytes) { sBytes.AppendFormat("{0:X2}", b); } return sbBytes.Tostring(); } c) public static string ConvertStringToHex(String input, System.Text.Encoding encoding) { { Byte[] stringBytes = encoding.GetBytes(input); StringBuilder sbBytes = new StringBuilder(stringBytes.Length * 2); foreach (byte b in stringBytes) { sbBytes.AppendFormat("{0:X2}", b); } Console.WriteLine(sbBytes.ToString());//sbBytes.ToString()); return sbBytes.ToString(); } } |
A. | A |
B. | B |
C. | C |
D. | None of the mentioned |
Answer» D. None of the mentioned | |
1655. |
Which of the following code is used for conversion of hex to string form ?
static void Main(string[] args) { string testString = "MIKA@?&^"; string normal = ConvertHexToString (hex, System.Text.Encoding.Unicode); Console.WriteLine(normal); Console.ReadLine(); } a) public static string ConvertHexToString(String hexInput, System.Text.Encoding encoding) { char[] numberChars = hexInput.Length; byte[] bytes = new byte[numberChars / 2]; for (int i = 0; i < numberChars; i += 2) { bytes[i / 2] = Convert.ToByte(hexInput.Substring(i, 0), 16); } return encoding.GetString(bytes); } b) public static string ConvertHexToString(String hexInput, System.Text.Encoding encoding) { int numberChars = hexInput.Length; byte[] bytes = new byte[numberChars / 2]; for (int i = 0; i < numberChars; i += 2) { bytes[i / 2] = Convert.ToByte(hexInput.Substring(i, 2), 16); } return encoding.GetString(bytes); } c) public static string ConvertHexToString(String hexInput, System.Text.Encoding encoding) { string numberChars = hexInput.Length; byte[] bytes = new byte[numberChars]; for (int i = 0; i < numberChars; i += 2) { bytes[i / 2] = Convert.ToByte(hexInput.Substring(i, 2), 16); } return encoding.GetString(bytes); } |
A. | A |
B. | B |
C. | C |
D. | None of the mentioned |
Answer» C. C | |
1656. |
Correct output for the C#.NET code given below is :
string s1 = " I AM BEST "; string s2; s2 = s1.substring (5, 4); Console.WriteLine (s2); |
A. | AM BEST |
B. | I AM BES |
C. | BEST |
D. | I AM |
Answer» D. I AM | |
1657. |
What will be the output of the C#.NET code snippet given below?
namespace McqsMentorConsoleApplication { class SampleProgram { static void Main(string[ ] args) { int i = 5; int j; fun1(ref i); fun2(out j); Console.WriteLine(i + ", " + j); } static void funl(ref int x) { x = x * x; } static void fun2(out int x) { x = 6; x = x * x; } } } |
A. | 5, 6 |
B. | 5, 36 |
C. | 25, 36 |
D. | 25, 0 |
Answer» D. 25, 0 | |
1658. |
Which element is used for creating links? |
A. | |
B. | |
C. | |
D. | |
Answer» B. | |
1659. |
Relative URLs are used to ____________ |
A. | Link other pages within the same site |
B. | Link the same page with other sites |
C. | Link other pages with other sites |
D. | Does not link |
Answer» B. Link the same page with other sites | |
1660. |
What is the color of an unvisited link? |
A. | Red |
B. | Blue |
C. | Purple |
D. | Green |
Answer» C. Purple | |
1661. |
Which one of the following is not the value of the target attribute? |
A. | _blank |
B. | _top |
C. | _self |
D. | _empty |
Answer» E. | |
1662. |
File paths are not used for linking in _________ |
A. | JavaScripts |
B. | PHP |
C. | Style Sheets |
D. | Images |
Answer» C. Style Sheets | |
1663. |
How can we insert Javascript in HTML? |
A. | Using sockets |
B. | Using marquee tag |
C. | Using script tag |
D. | Using style tag |
Answer» D. Using style tag | |
1664. |
Which one of the following will set viewport to contain given bounds? |
A. | FitBounds() |
B. | GetBounds() |
C. | GetHeading() |
D. | PanTo() |
Answer» B. GetBounds() | |
1665. |
Which of the following markup is correct?
|
A. | I |
B. | Ii |
C. | I and ii |
D. | None of the mentioned |
Answer» C. I and ii | |
1666. |
Choose the incorrect escape character entity |
A. | > |
B. | > |
C. | < |
D. | None of the mentioned |
Answer» E. | |
1667. |
specifies date and time with |
A. | Local time |
B. | International time |
C. | No time zone |
D. | Local time zone |
Answer» D. Local time zone | |
1668. |
defines a |
A. | Link to reset all the form values |
B. | Reset button |
C. | Reset field |
D. | Reset radio button |
Answer» C. Reset field | |
1669. |
Server-Sent Events allows a web page to get updates from |
A. | Windows |
B. | Local Storage |
C. | Server |
D. | None |
Answer» D. None | |
1670. |
Server-Sent Events usually denoted as? |
A. | SE |
B. | SSE |
C. | Server Event |
D. | SS-Events |
Answer» C. Server Event | |
1671. |
In HTML form is used for |
A. | One line text |
B. | Block of text |
C. | One paragraph |
D. | None |
Answer» B. Block of text | |
1672. |
For style foundation Bootstrap uses____________ |
A. | LESS |
B. | Sass |
C. | Resizer |
D. | Stylus |
Answer» B. Sass | |
1673. |
HTML local storage object that stores data for one session is? |
A. | Window.sessionStorage |
B. | Window.localStorage |
C. | Window.blockStorage |
D. | Window.localStorage |
Answer» B. Window.localStorage | |
1674. |
Scrolling piece of text displayed either horizontally or vertically is created by |
A. | tag |
B. | |
C. | tag |
D. | None of them |
Answer» D. None of them | |
1675. |
|
A. | Centered align paragraph |
B. | Centered align Heading |
C. | Left aligned paragraph |
D. | Left aligned Heading |
Answer» C. Left aligned paragraph | |
1676. |
Consider the markup. Which HTML5 element can replace the ? ? |
A. | |
B. | |
C. | |
D. | Both a and b |
Answer» E. | |
1677. |
Which of the following selects all
elements? |
A. | Element,element |
B. | Element+element |
C. | Element,element |
D. | Element element |
Answer» D. Element element | |
1678. |
Which of the following selects every element whose href attribute value contains the given substring? |
A. | Attribute$=value |
B. | Attribute*=value |
C. | Attribute^=value |
D. | Attribute|=value |
Answer» C. Attribute^=value | |
1679. |
Which of the following selects everyelement that has no children? |
A. | :empty |
B. | :enabled |
C. | :checked |
D. | :disabled |
Answer» B. :enabled | |
1680. |
Which of the following will select everyelement that is the only child of its parent? |
A. | :only-child |
B. | :only-of-type |
C. | :optional |
D. | :out-of-range |
Answer» B. :only-of-type | |
1681. |
Which CSS property is equivalent for the attribute ? |
A. | Font-family |
B. | Font-style |
C. | Color |
D. | All of the mentioned |
Answer» C. Color | |
1682. |
The President of India is elected by the |
A. | Members of the Lok Sabha |
B. | Members of Both houses of the parliament |
C. | Members of the State Legislature |
D. | Electoral college consisting of the elected members of Both Houses of the parliament and State Assemblies |
Answer» E. | |
1683. |
Which one of the following computers is the fastest, biggest and expensive computer? |
A. | Personal Computer |
B. | Laptop |
C. | Netbook |
D. | Super computer |
Answer» E. | |
1684. |
The salary of the President is |
A. | Fixed in constitution |
B. | Fixed by a law made by the Parliament |
C. | It is mentioned in the Second Schedule of the Constitution |
D. | All of the above |
Answer» D. All of the above | |
1685. |
Who was the only Secretary General of the UNO to have died while in office ? |
A. | a |
B. | b |
C. | c |
D. | d |
Answer» B. b | |
1686. |
All India Harijan Sangha established in? |
A. | 1930 |
B. | 1931 |
C. | 1932 |
D. | 1933 |
Answer» D. 1933 | |
1687. |
The computer s processor consists of following parts |
A. | CPU and Main memory |
B. | Hard disc and Floppy disc |
C. | Main Memory and Storage |
D. | Operating system and Applications |
Answer» D. Operating system and Applications | |
1688. |
Mangal Pandey was a sepoy at? |
A. | Royal Gorkha Rifle |
B. | 34th Bengal Native Infantary |
C. | Sikh Regiment |
D. | None of above |
Answer» C. Sikh Regiment | |
1689. |
If the RBI adopts an expansionist open market operations policy, this means that it will |
A. | buy securities from non-government holders |
B. | sell securities in the open market |
C. | offer commercial banks more credit in the open market |
D. | openly announce to the market that it intends to expand credit |
Answer» D. openly announce to the market that it intends to expand credit | |
1690. |
First battle of Panipat was fought between? |
A. | Babur and Lodi |
B. | Akbar and Hemu |
C. | Mughal and British |
D. | Akbar and Lodi |
Answer» B. Akbar and Hemu | |
1691. |
The super computer PARAM was developed by |
A. | TATA |
B. | IIT-Kharagpur |
C. | IIT-Kanpur |
D. | C-DAC |
Answer» E. | |
1692. |
Subsidies mean that is |
A. | payment by government for purchase of goods and services |
B. | payment made by business enterprises to factors of production |
C. | payment made by companies to shareholders |
D. | payment made by the government to business enterprises, without buying any goods and services |
Answer» E. | |
1693. |
The Constitution of India came into effect from? |
A. | 15 January, 1950 |
B. | 26 January, 1950 |
C. | 15 August, 1950 |
D. | 15 January, 1950 |
Answer» C. 15 August, 1950 | |
1694. |
Second battle of Panipat was fought between? |
A. | Babur and Lodi |
B. | Akbar and Hemu |
C. | Mughal and British |
D. | Akbar and Lodi |
Answer» C. Mughal and British | |
1695. |
Short-term finance is usually for a period ranging up to |
A. | 5 months |
B. | 10 months |
C. | 12 months |
D. | 8 months |
Answer» D. 8 months | |
1696. |
Who was the founder of Madras? |
A. | Francis Day |
B. | Lord Dalhousie |
C. | Sir John Child |
D. | Robert Clive |
Answer» B. Lord Dalhousie | |
1697. |
Constitution of India was adopt by constituent assembly on? |
A. | 25 October, 1948 |
B. | 25 October, 1949 |
C. | 26 November, 1948 |
D. | 26 November, 1949 |
Answer» E. | |
1698. |
Vermicompost is a/an |
A. | Inorganic fertilizer |
B. | toxic substance |
C. | organic biofertilzer |
D. | synthesis fertilizer |
Answer» D. synthesis fertilizer | |