FliQi Education App Download
Basic Computer Instructor — Paper II · प्रश्न-बैंक

Basic Computer Instructor — Paper II — Dot Net के प्रश्न

101 जाँचे हुए प्रश्न · 1 topics · परीक्षा में 1 प्रश्न

Topics

प्रश्न

पहले 10 प्रश्नों के उत्तर और हल यहीं खुले हैं; बाक़ी 10 के उत्तर और हल FliQi Question Bank app में।

भाषा
प्रश्न 1उत्तर + हल Introduction to DOT NET Framework
ASP में cookie बनाने के लिए किस command का उपयोग किया जाता है?
In ASP, which command is used to create a cookie?
  1. ARequest.GetCookies
  2. BRequest.Cookies
  3. CResponse.Cookies
  4. DResponse.GetCookies

सही उत्तर / Answer: (C)

हल / Solution
Cookie server बनाता है और response के साथ browser को भेजता है। इसलिए ASP में cookie Response object से बनती है, जैसे Response.Cookies("user") = "Ram"। इसके साथ Expires देकर उसकी अवधि भी तय की जा सकती है। Request.Cookies सिर्फ़ browser से लौटी cookie पढ़ता है, नई cookie नहीं बनाता। GetCookies नाम की कोई command ASP में नहीं होती। इसलिए सही उत्तर Response.Cookies है।
A cookie is created by the server and sent to the browser with the response. So in ASP a cookie is made with the Response object, for example Response.Cookies("user") = "Ram". Its lifetime can be set with the Expires property. Request.Cookies only reads a cookie that came back from the browser; it cannot create a new one. ASP has no command called GetCookies.
प्रश्न 2उत्तर + हल Introduction to DOT NET Framework
ASP में cookie का मान पढ़ने के लिए किस command का उपयोग किया जाता है?
In ASP, which command is used to retrieve a cookie value?
  1. ARequest.GetCookies
  2. BRequest.Cookies
  3. CResponse.Cookies
  4. DResponse.GetCookies

सही उत्तर / Answer: (B)

हल / Solution
Cookie browser में रहती है और हर request के साथ server पर लौटती है। इसलिए उसे पढ़ने के लिए Request object लगता है, जैसे Request.Cookies("user")। Response.Cookies उलटा काम करता है; यह cookie बनाकर या बदलकर browser को भेजता है। Request.GetCookies और Response.GetCookies नाम की कोई command ASP में नहीं होती। इसलिए cookie का मान पढ़ने के लिए Request.Cookies सही है।
A cookie is stored in the browser and comes back to the server with every request. So it is read through the Request object, for example Request.Cookies("user"). Response.Cookies does the opposite job; it creates or changes a cookie and sends it to the browser. ASP has no command called Request.GetCookies or Response.GetCookies. So Request.Cookies is used to retrieve a cookie value.
प्रश्न 3उत्तर + हल Introduction to DOT NET Framework
form से user की जानकारी पढ़ने के लिए प्रायः किस ASP object का उपयोग किया जाता है?
Which ASP object is often used to retrieve user information from forms?
  1. AApplication objectThe Application object
  2. BRequest objectThe Request object
  3. CSession objectThe Session object
  4. DResponse objectThe Response object

सही उत्तर / Answer: (B)

हल / Solution
जब user form भरकर submit करता है, तो उसका data browser से server पर आता है। ASP में यह data Request object से पढ़ा जाता है। POST method वाले form के लिए Request.Form("name") और GET के लिए Request.QueryString("name") लगता है। Response object उलटी दिशा में output भेजता है। Application और Session objects data सँभालकर रखते हैं, form का data नहीं पढ़ते। इसलिए उत्तर Request object है।
When a user fills in a form and submits it, the data travels from the browser to the server. In ASP this data is read with the Request object: Request.Form("name") for a POST form and Request.QueryString("name") for GET. The Response object works in the other direction and sends output. The Application and Session objects store data; they do not read form input.
प्रश्न 4उत्तर + हल Introduction to DOT NET Framework
server से user को output भेजने के लिए प्रायः किस ASP object का उपयोग किया जाता है?
Which ASP object is often used to send output to the user from the server?
  1. AApplication objectThe Application object
  2. BRequest objectThe Request object
  3. CSession objectThe Session object
  4. DResponse objectThe Response object

सही उत्तर / Answer: (D)

हल / Solution
ASP में Response object server से browser की ओर जाने वाला सब कुछ सँभालता है। Response.Write() से text भेजा जाता है, Response.Redirect() से user को दूसरे page पर भेजा जाता है, और Response.Cookies से cookie बनाई जाती है। Request object उलटी दिशा का काम करता है, यानी browser से आया data पढ़ता है। Application और Session objects data सँभालकर रखते हैं, output नहीं भेजते।
In ASP, the Response object handles everything that goes from the server to the browser. Response.Write() sends text, Response.Redirect() sends the user to another page, and Response.Cookies creates cookies. The Request object works in the other direction and reads data coming from the browser. The Application and Session objects store data; they do not send output. So the answer is the Response object.
प्रश्न 5उत्तर + हल Introduction to DOT NET Framework
"time.inc" फ़ाइल को शामिल (include) करने का सही तरीका क्या है?
What is the correct way to include the file "time.inc"?
  1. A<!--#include file="time.inc"-->
  2. B<include file="time.inc">
  3. C<% #include file="time.inc" %>
  4. D<% include file="time.inc" %>

सही उत्तर / Answer: (A)

हल / Solution
ASP में किसी दूसरी फ़ाइल को page में जोड़ने के लिए Server Side Include (SSI) directive लगता है। इसका रूप HTML comment जैसा होता है: <!--#include file="time.inc"-->। server page चलाने से पहले इस पंक्ति की जगह उस फ़ाइल की सामग्री रख देता है। यह directive <% %> के अंदर नहीं लिखा जाता। <include> नाम का कोई tag भी नहीं होता। इसलिए विकल्प 1 सही है।
In ASP, another file is added to a page with a Server Side Include (SSI) directive. It looks like an HTML comment: <!--#include file="time.inc"-->. Before running the page, the server puts the file's content in place of this line. The directive is not written inside <% %> script blocks, and there is no tag called <include>. So option 1 is correct.
प्रश्न 6उत्तर + हल Introduction to DOT NET Framework
.NET Framework में threads के लिए संभावित priority level निम्नलिखित में से कौन-से हैं?
In the .NET Framework, which of the following denote possible priority levels for threads?
  1. ANormal
  2. BAboveNormal
  3. CHighest
  4. Dउपरोक्त सभीAll the Above

सही उत्तर / Answer: (D)

हल / Solution
.NET में thread की priority ThreadPriority enum से तय होती है। इसमें पाँच मान हैं: Lowest, BelowNormal, Normal, AboveNormal और Highest। हर नया thread default रूप से Normal priority पर बनता है। Thread.Priority property से इसे बदला जा सकता है। ऊँची priority वाले thread को scheduler ज़्यादा CPU समय देता है। Normal, AboveNormal और Highest तीनों वैध हैं, इसलिए उत्तर 'उपरोक्त सभी' है।
In .NET, a thread's priority is set with the ThreadPriority enum. It has five values: Lowest, BelowNormal, Normal, AboveNormal and Highest. Every new thread starts at Normal priority by default, and the Thread.Priority property can change it. The scheduler gives more CPU time to higher priority threads. Normal, AboveNormal and Highest are all valid, so the answer is 'All the Above'.
प्रश्न 7उत्तर + हल Introduction to DOT NET Framework
ASP में "Hello World" कैसे लिखते (दिखाते) हैं?
How do you write "Hello World" in ASP?
  1. AResponse.Write("Hello World")
  2. B'Hello World'
  3. CDocument.Write("Hello World")
  4. Dइनमें से कोई नहींNone of the above

सही उत्तर / Answer: (A)

हल / Solution
ASP में server से browser को output भेजने के लिए Response object की Write method लगती है। इसलिए <% Response.Write("Hello World") %> लिखने पर page पर Hello World दिखता है। VBScript में एकल उद्धरण (') से शुरू होने वाली पंक्ति comment होती है, इसलिए वह कुछ नहीं छापती। document.write() JavaScript की browser-side method है, ASP के server objects की नहीं।
In ASP, output is sent from the server to the browser with the Write method of the Response object. So writing <% Response.Write("Hello World") %> shows Hello World on the page. In VBScript, a line starting with a single quote (') is a comment, so it prints nothing. document.write() is a browser-side JavaScript method, not part of the ASP server objects.
प्रश्न 8उत्तर + हल Introduction to DOT NET Framework
ASP.NET page से email संदेश भेजने के लिए निम्नलिखित में से किसका उपयोग किया जाता है?
Which of the following is used to send an email message from an ASP.NET page?
  1. ASystem.Web.Mail.MailMessage
  2. BSystem.Web.Mail.SmtpMail
  3. CA और B दोनोंBoth A and B
  4. Dइनमें से कोई नहींNone of the above

सही उत्तर / Answer: (C)

हल / Solution
पुराने ASP.NET (1.x) में email भेजने के लिए System.Web.Mail namespace की दो classes साथ लगती थीं। MailMessage object में From, To, Subject और Body भरे जाते हैं। फिर SmtpMail.Send() method उस संदेश को SMTP server से भेजती है। यानी एक class संदेश बनाती है और दूसरी भेजती है, इसलिए दोनों चाहिए। .NET 2.0 से इनकी जगह System.Net.Mail आ गया, पर यहाँ उत्तर 'A और B दोनों' है।
In early ASP.NET (1.x), sending email used two classes from the System.Web.Mail namespace together. A MailMessage object holds From, To, Subject and Body. Then the SmtpMail.Send() method sends that message through an SMTP server. One class builds the message and the other sends it, so both are needed. From .NET 2.0, System.Net.Mail replaced them, but the answer here is 'Both A and B'.
प्रश्न 9उत्तर + हल Introduction to DOT NET Framework
ASP server scripts किन सीमांककों (delimiters) से घिरी होती हैं?
ASP server scripts are surrounded by which delimiters?
  1. A<%...%>
  2. B<&>...</&>
  3. C<%>...</%>
  4. D<script>...</script>

सही उत्तर / Answer: (A)

हल / Solution
ASP में server पर चलने वाला script <% और %> चिह्नों के बीच लिखा जाता है, जैसे <% Response.Write("Hi") %>। server इस हिस्से को चलाकर केवल उसका नतीजा browser को भेजता है। सादा <script> tag, बिना runat="server" के, browser में चलता है, यानी वह client-side होता है। <&> और <%>...</%> जैसे closing tag वाले रूप ASP में होते ही नहीं।
In ASP, server-side script is written between the <% and %> delimiters, for example <% Response.Write("Hi") %>. The server runs this part and sends only its result to the browser. A plain <script> tag without runat="server" runs in the browser, so it is client-side. Forms like <&> or <%>...</%> with a closing tag do not exist in ASP.
प्रश्न 10उत्तर + हल Introduction to DOT NET Framework
निम्नलिखित में से कौन ASP.NET एप्लिकेशन में state सँभालने (manage करने) के तरीके हैं?
Which of the following denote ways to manage state in an ASP.NET application?
  1. ASession objects
  2. BApplication objects
  3. CViewState
  4. Dउपरोक्त सभीAll the Above

सही उत्तर / Answer: (D)

हल / Solution
HTTP stateless है, इसलिए ASP.NET data को requests के बीच बचाए रखने के कई तरीके देता है। Session object हर user का अलग data server पर रखता है। Application object ऐसा data रखता है जो सभी users के बीच साझा हो। ViewState एक ही page के postbacks के बीच controls के मान hidden field में रखता है। तीनों state management के तरीके हैं, इसलिए उत्तर 'उपरोक्त सभी' है।
HTTP is stateless, so ASP.NET gives several ways to keep data between requests. The Session object keeps separate data for each user on the server. The Application object keeps data that is shared by all users. ViewState keeps control values in a hidden field across postbacks of the same page. All three are ways to manage state, so the answer is 'All the Above'.
आगे के 10 प्रश्नों के उत्तर और हल app मेंFliQi Question Bank — अभ्यास, हल और आपकी प्रगति
App खोलिए
प्रश्न 13उत्तर app में Introduction to DOT NET Framework
जब user किसी web page की माँग करता है, तो ASP.NET page का पहला event निम्नलिखित में से कौन-सा है?
Which of the following is the first event of an ASP.NET page when the user requests a web page?
  1. ALoad
  2. BInit
  3. CPreLoad
  4. DPreInit
उत्तर और हल FliQi Question Bank app में देखें (Answer & solution in the app)
Basic Computer Instructor — Paper II Dot Net — topic-वार पूरा अभ्यासFliQi Question Bank app में