Skip to main content

Posts

Showing posts from August, 2014

असिमोको नयाँ संसकरण

             जापानको होन्डा कम्पनीले हुमनोइड रोबोट 'असिमो ' को पछिल्लो संस्करण सार्वजनिक गरेको छ।  अहिलेको असिमो पहिलेभन्दा थप् बौद्दिक भएको छ र यसको हातको निपुणता पनि अझ राम्रो  छ। असिमो अघि र पछि सर्न तथा भऱयाङ्ग तल-माथि गर्न तथा उफ्रन सक्षम  छ। त्यसबाहेक असिमोले धेरै मानिसले एकै स्थानमा कुराकानी गरे पनि उनीहरुको अनुहार तथा स्वर पहिचान गर्न सक्छ। एसले आफ्नो टाउको मा जोडिएको दुइटा क्यामेराले क्याप्चर गरेको भिजुअल इन्फोर्मेशन को आधारमा धेरै बस्तु को छल तथा उनीहरुको दूरी एवम् दिशा समेत थाहा पाउछ। येस्मा भएका मानिसका  दुइटा हातले बोत्तल खोल्न , पेय पदार्थ खन्याउन तथा समान बोक्न सक्छन। यी सबै  उस्ले सांकेतिक भाषा पनि प्रयोग गर्छ।          ४ फीट ३ इन्च अग्लो असिमो प्रति घण्टा ५ दशमलव ६ माइल दौडिन सक्छ। यसभन्दा पहिलेको असिमो १  दशमलव ८ माइल मात्र दौडिन सक्थ्यो।  यसले मानिस कता हिडी रहेको छ भन्ने दिशाको अनुमान पनि गर्न सक्छ,जसले गर्दा  रोबोटले ठक्करबाट जोगिन बैकल्पिक बाटो पनि प्रयोग गर्न सक्छ।  हसिलो अनुहार भएको असिमोले अंग्रेजी र जापानी भाषा बोल्छ भने यसले ट्रे बोक्न

What is manipulator in C++?

Answer: Manipulators are special functions that can be included in the I/O statement to alter the format parameters of a stream. Table-2 shows some important manipulator functions that are frequently used. To access these manipulators, the file < iomanip.h > should be included in program.                               Table-2               Manipulators                                                    Equivalent ios function               setw( )                                                                  width( )               setprecision( )                                                  precision( )               setfill( )                                                                                fill( )               setiosflags( )                                                      setf( )                  resetioflags( )                                                   unsetf( )               In addition to these functions sup

Declaration of variable and type casting

Q3. What is difference between dynamic and reference declaration of variable? Answer:   Dynamic initialization is extensively used in object-oriented programming. We can create exactly the type of object needed using information that is known only at the run time. C++ introduces a new kind of variable known as the reference variable. A reference variable provides an alias (alternative name) for a previously defined variable. For example, if we make the variable sum a reference to the variable total, then sum and total can be used interchangeably to represent the variable. Q4.What is type casting? explain the use of type casting with suitable example.            When there are two operands of different types in an expression, the lower-type variable is converted to the type of the higher-type variable. For example, if one operand is of type int and other is of float , both are converted into float type. Thus, if data types are mixed in an expression, C++ performs the convers

C++ home work

Q1. How do you differentiate variables and identifiers? Answer: A variable is a data name that may be used to store a data value. Unlike constants that remain unchanged during the execution of a program, a variable may take different values at different times during execution. Identifiers refer to the names of variables, functions, arrays, classes, etc., created by the programmer. The first character in an identifier must be a letter or the _ (underscore) character; however, beginning identifiers with an underscore is considered poor programming style. Q2. Does C++ provide any ternary operator? If yes, explain its works. Answer: A ternary operator pair “? :” is available in C++ to construct conditional expressions of the form exp1 ? exp2 : exp3; Where,  exp1, exp2, andexp3are expressions. The operator ? : works as follows: exp1 is evaluated first. If it is nonzero (true), then the expression exp2 is evaluated and becomes the value of the expression. If exp1 is false,