Tuesday, September 18, 2018

Computer Science FAQ -Set 5

A sizeable geographical area with communication based on the telephone system is though as
A Winchester disk is a
Which one of the following is the first second-generation computer?
Which of the following is not a factor affecting the processing capability or performance of a PC system?
Condensing output data to exhibit specific information is
Which of the following is used for manufacturing chips?
Which of the following terms applies to communication between separate computer systems?
Output hardware is often categorized according to whether it:
The original ASCII code used _____ bits of each byte, reserving that last bit for error checking.
Which of the following terms is the most closely related to main memory?
The computer industry uses prefixes of Greek origin to measure large amounts of data. Which term describes 1024 bytes.
Which kind of storage device can be carried around?
One nibble is equal to
In which area of the primary storage section are the intermediate processing results held temporarily?
What is required when more than one person uses a central computer at the same time?
Which of the following languages is more suited to a structured program?
A computer assisted method for the recording and analyzing of existing or hypothetical systems is
The brain of any computer system is
What difference does the 5th generation computer have from other generation computers?
Which of the following computer language is used for artificial intelligence?
The tracks on a disk which can be accessed without repositioning the R/W heads is
Which of the following is the 1's complement of 10?
A section of code to which control is transferred when a processor is interrupted is known as
Which part interprets program instructions and initiate control operations.
The binary system uses powers of
A computer program that converts assembly language to machine language is
The time required for the fetching and execution of one simple machine instruction is
The time for which a piece of equipment operates is called
Binary numbers need more places for counting because
Which access method is used for obtaining a record from a cassette tape?
Any type of storage that is used for holding information between steps in its processing is
A name applied by Intel corp. to high speed MOS technology is called
A program component that allows structuring of a program in an unusual way is known as
The radian of a number system
The section of the CPU that selects, interprets and sees to the execution of program instructions
Which type of system puts the user into direct conversation with the computer through a keyboard?
The term referring to evacuating the content of some part of the machine is known as
A single packet on a data link is known as
The process of communicating with a file from a terminal is
A common boundary between two systems is called
The examination and changing of single bits or small groups of his within a word is called
Which computer has been designed to be as compact as possible?
Which method is used to connect a remote computer?
How many bit code is used by Murray code for TELEPRINTER machines.
The symbols used in an assembly language are
The 2's complement of a binary no. is obtained by adding.....to its 1's complement.
A systems programming language for microcomputers in the Intel family is
A datum that indicates some important state in the content of input or output is
Which is a non-standard version of a computing language?
Which of the following is still useful for adding numbers?
The average time necessary for the correct sector of a disk to arrive at the read write head is _____
A number that is used to control the form of another number is known as
A general purpose single-user microcomputer designed to be operated by one person at a time is
ASCII stands for
Which device of computer operation dispenses with the use of the keyboard?
The microcomputer, Intel MCS-80 is based on the widely used Intel
Which is a machine-oriented high-level language for the GEC 4080 series machines.
A program that is employed in the development, repair or enhancement of other programs is known as
Any storage device added to a computer beyond the immediately usable main storage is known as
Which output device is used for translating information from a computer into pictorial form on paper.
The list of coded instructions is called
What is the term used for describing the judgmental or commonsense part of problem solving?
What stage of the manufacturing process has been described as "the mapping of function onto form"?
Which kind of planning consists of successive representations of different levels of a plan?
What was originally called the "imitation game" by its creator?
Decision support programs are designed to help managers make:
PROLOG is an AI programming language which solves problems with a form of symbolic logic known as predicate calculus. It was developed in 1972 at the University of Marseilles by a team of specialists. Can you name the person who headed this team?
Programming a robot by physically moving it through the trajectory you want it to follow is called:
To invoke the LISP system, you must enter
DEC advertises that it helped to create "the world's first expert system routinely used in an industrial environment," called XCON or:
Prior to the invention of time sharing, the prevalent method of computer access was:
Seymour Papert of the MIT AI lab created a programming environment for children called:
The Strategic Computing Program is a project of the:
The original LISP machines produced by both LMI and Symbolics were based on research performed at:
In LISP, the addition 3 + 2 is entered as
Weak AI is
In LISP, the function assigns the symbol x to y is
In LISP, the function returns t if <object> is a CONS cell and nil otherwise:
In a rule-based system, procedural domain knowledge is in the form of:
If a robot can alter its own trajectory in response to external conditions, it is considered to be:
One of the leading American robotics centers is the Robotics Institute located at:
In LISP, the function returns the first element of a list Is
Nils Nilsson headed a team at SRI that created a mobile robot named:
An AI technique that allows computers to understand associations and relationships between objects and events is called:
The new organization established to implement the Fifth Generation Project is called:
The field that investigates the mechanics of human intelligence is:
A problem is first connected to its proposed solution during the _____ stage.
What is the name of the computer program that simulates the thought processes of human beings?
What is the name of the computer program that contains the distilled knowledge of an expert?
Claude Shannon described the operation of electronic switching circuits with a system of mathematical logic called:
A computer program that contains expertise in a particular domain is called an:
Ambiguity may be caused by:
Which company offers the LISP machine considered to be "the most powerful symbolic processor available"?
What of the following is considered to be a pivotal event in the history of AI.
Natural language processing is divided into the two subfields of:
High-resolution, bit-mapped displays are useful for displaying:
A bidirectional feedback loop links computer modelling with:
Which of the following have people traditionally done better than computers?
In LISP, the function evaluates both <variable> and <object> is
Which type of actuator generates a good deal of power but tends to be messy?
Research scientists all over the world are taking steps towards building computers with circuits patterned after the complex inter connections existing among the human brain's nerve cells. What name is given to such type of computers?
The hardware features of LISP machines generally include:
In 1985, the famous chess player David Levy beat a world champion chess program in four straight games by using orthodox moves that confused the program. What was the name of the chess program?
The explanation facility of an expert system may be used to:
A process that is repeated, evaluated, and refined is called:
Visual clues that are helpful in computer vision include:
In LISP, the function X (x). (2x+l) would be rendered as
A natural language generation program must decide:
Who is considered to be the "father" of artificial intelligence?
In which of the following areas may ICAI programs prove to be useful?
A network with named nodes and labeled arcs that can be used to represent certain natural language grammars to facilitate parsing.
A series of AI systems developed by Pat Langley to explore the role of heuristics in scientific discovery.
A.M. turing developed a technique for determining whether a computer could or could not demonstrate the artificial Intelligence,, Presently, this technique is called
A Personal Consultant knowledge base contain information in the form of:
Which approach to speech recognition avoids the problem caused by the variation in speech patterns among different speakers?
Which of the following, is a component of an expert system?
A computer vision technique that relies on image templates is:
DARPA, the agency that has funded a great deal of American AI research, is part of the Department of:
Which of these schools was not among the early leaders in AI research?
A certain Professor at the Stanford University coined the word 'artificial intelligence' in 1956 at a conference held at Dartmouth college. Can you name the Professor?
In LISP, the function (copy-list <list>)
LISP machines also are known as:
Natural language processing can be divided into the two subfields of:
How many ALU(s) is/are control by one control unit is SIMD (single instruction stream, multiple data stream) architecture?
Which of the following function returns t if the object is a number in LISP?
Which of the following have computers traditionally done better than people?
The characteristics of the computer system capable of thinking, reasoning and learning is known is
What part of the manufacturing process relate to each stage of the process and to the process as a whole?
The area of AI that investigates methods of facilitating communication between people and computers is:
In the 16th century, a Czech rabbi reportedly created a living clay man whose name has become a synonym for an artificial human. The clay man's name was:
For speech understanding systems to gain widespread acceptance in office automation, they must feature:
In LISP, the function returns the list that results after the first element is removed (the rest f the list), is
Output segments of AI programming contain(s)
LISP was created by:
Expert Ease was developed under the direction of:
An AI system developed by Terry A. Winograd to permit an interactive dialogue about a domain he called blocks-world.
MLMenu, a natural language interface for the TI Explorer, is similar to:
How many control unit(s) is/are available in SISD (single data stream, single data stream) architecture?
Strong AI is
The traditional way to exit and LISP system is to enter
In which of the following situations might a blind search be acceptable?
In LISP, the function (endp <list>)
In LISP, which of the following function assigns the value 10 to the symbol a?
In LISP, the atom that stands for "False" is
The expert system developed at MIT to solve mathematical problems is known as:
Which approach to speech recognition avoids the problem caused by the differences in the way words are pronounced according to context?
A KES knowledge base contains information in the form of:
In AI programming, a list may contain:
In LISP, the function (minusp (-20 4 8 8 1) returns
Special programs that assist programmers are called:
If the English Philosopher Thomas Hobbes could be called 'grandfather' of artificial intelligence, then who could be called its father?
In LISP, the function returns t if <integer> is even and nil otherwise:
Which of the following is an advantage of using an expert system development tool?
An AI system developed by Daniel Bobrow to read and solve algebra word problems
The "Turing Machine" showed that you could use a/an _____ system to program any algorithmic task.
MCC is investigating the improvement of the relationship between people and computers through a technology called:
The first widely-used commercial form of Artificial Intelligence (Al) is being used in many popular products like microwave ovens, automobiles and plug in circuit boards for desktop PCs. It allows machines to handle vague information with a deftness that mimics human intuition. What is the name of this AI?
In his landmark book Cybernetics, Norbert Wiener suggested a way of modeling scientific phenomena using not energy, but:
Input segments of AI programming contain(s)
The applications in the Strategic Computing Program include:
In LISP, the function evaluates <object> and assigns this value to the unevaluated <sconst>.
The primary interactive method of communication used by humans is:
Elementary linguistic units which are smaller than words are:
In LISP, the atom that stands for "true" is
A mouse device may be:
An expert system differs from a database program in that only an expert system:
Arthur Samuel is linked inextricably with a program that played:
Natural language understanding is used in:
Which of the following are examples of software development tools?
The first AI programming language was called:
The Personal Consultant is based on:
The conference that launched the AI revolution in 1956 was held at:
Texas Instruments Incorporated produces a low-cost LISP machine called:
When a top-level function is entered, the LISP processor do(es)
One method of programming a computer to exhibit human intelligence is called modeling or:
Graphic interfaces were first used in a Xerox product called:
The Al researcher who co-authored both the Handbook of Artificial Intelligence and The Fifth Generation is:
Which of the following is being investigated as a means of automating the creation of a knowledge base?
The CAI (Computer-Assisted Instruction) technique based on programmed instruction is:
A robot's "arm" is also known as its:
KEE is a product of:
Computers normally solve problem by breaking them down into a series of yes-or-no decisions represented by 1s and 0s. What is the name of the logic that allows computers to assign numerical values that fail somewhere between 0 and 1?
The component of an ICAI (Intelligent Computer-Asslsted Instruction) presenting information to the student is the:
The company that grew out of research at the MIT AI lab is:
Which technique is being investigated as an approach to automatic programming?
One definition of AI focuses on problem-solving methods that process:
Artificial intelligence is
The primary method that people use to sense their environment is:
The Newell and Simon program that proved theorems of Principia Mathematica was:
In LISP, the function assigns . the value of a to b is
The cray X-MP, IBM 3090 and connection machine can he characterized as
In LISP, the function (list-length <list>)
ART (Automatic Reasoning Tool) is designed to be used on:
Which particular generation of computers is associated with artificial intelligence?
Shaping teaching techniques to fit the learning patterns of individual students is the goal of:
Which of the following function returns t If the object is a symbol m LISP?
The symbols used in describing the syntax of a programming language are
The integrated circuit was invented by Jack Kilby of:
People overcome natural language problems by:
The Cedar, BBN Butterfly, Cosmic Cube and Hypercube machine can be characterized as
A program language:
Which of the following symbol modes are used to input of graphics to General CAD system?
Which technique enables the designer to mold and shape, rather than construct on object using a series of lines?
Computer-based controllers:
Flood guns bombard the phosphor surface of the tube in which one of the following types of CRT technology?
Automation normally means:
Trend analysis:
The use of specialized workstations:
What key hardware item ties a CAD/ CAM system together?
Which of these controller types is the most accurate?
Flat panel displays are based on what type of technology?
Which of the following is a graphical input device?
Today, programmable controllers:
Productivity is defined as:
The main function(s) of computer in CAD is/are
The first industrial robot for commercial uses was installed in a Japanese plant at Toyota Automatic Loom Company, the parent company of the Toyota Automobile Group. When did this robot go into operation?
What is the difference between integral and derivative control?
The program counter:
Digital signals:
There are several procedures you can implement to provide maximum security. The most important of these is:
Semiconductor devices:
A drum timer is a good example of:
The formula for memory capacity is:
How is the integral mode implemented using analog methods?
The general type of process found in industry is:
Which method is frequently used, especially in the early stages of design?
In raster-scan colour monitors, colour can be intensified by:
Timing using a TM990 micro¬computer:
A discrete parts process is:
Speech recognition:
Which device does the general population associate most with automation?
Using a microcomputer as a controller allows:
If the transient response is under damped:
What should be first considered in choosing a plotter?
The coordinate system used to describe a workpiece:
A programmable controller:
The SKETCHPAD system
The name given to the test that determines whether a machine can think is the:
Which of the following is a machine language instruction?
The two major categories of software are: application software and
What was the name of the Japanese worker who was killed by an industrial robot at the Akashi plant of Kawasaki Heavy Industries in Japan?
When of the following produces the best quality graphics reproduction?
The three key elements for a graphics workstation include the host processor, display controller, and:
An operational amplifier:
The raster CRT eliminates:
Who made the statement "if a robot can do a job, a person should not be doing it"?
CAD/CAM is the inter-relationship between:
What prevents a robotic instrument from running into other objects?
The axis of movement of a robot may include:
Numerical control:
A flip-flop:
A technique for displaying applications where complex 3-D geometric are required for the exteror shall of a product is called:
The user communicates directly with the computer through its peripheral devices is known as
A semi-continuous operation means:
A servo controlled robot:
An aneroid barometer
Which of the following represents a conditional branching instruction?
The electronic component that has been the key to recent developments in automation is the:
Which of the following is considered a high-level language?
Pressure sensors:
Flexible manufacturing allows for:
Three different aspects of colour are used to define specific colours. They are hue, saturation, and:
A way to transfer programs to a central system is:
The device that assembles groups of characters into complete messages prior to their entering the CPU is called:
Which industry is the leading user of robots?
What two methods are available to build electronic continuous control?
If the transient response of a system is overdamped:
Resolution in a CRT refers to:
Actuators are used to:
If the period of a sine wave is 0.001 second, the frequency of the sine wave is:
Software is:
Which item best describes a CAM technology?
The linking of PCs with a communi¬cations system is referred to as:
Two of the major processing languages are PROLOG and:
Vision sensors:
A disadvantage of Numerical Control (NC) is:
Digitizers can be converted from "dumb" to "smart" through the addition of:
Over the last ten years, productivity has risen most rapidly in:
The difference between a high-technology and a medium-technology robot is the:
The output of a thermocouple is:
Compared to humans, machines:
A solenoid:
Most industrial control applications:
When was the first successful industrial robot installed in the General Motors Plant in USA?
The physical arrangement of equipment in a network is called:
The computer graphics system called SKETCHPAD was demonstrated at
The new industrial revolution has been caused by:
Straight-line operations:
The workspace required for a robot:
In pen plotters, "resolution" refers to the shortest possible line, but in electrostatic plotters it refers to:
A common data base is one requisite for converting CAD and CAM to CIM. Another is that:
Sensors:
Which of the following devices could be part of a sensor?
In general, American buyers will purchase goods:
The reliability life cycle of a product:
Robots consist of three basic components; power supply, control (memory) console, and:
Today's engineers feel that the ultimate solution to the CAD/CAM problem will be
The method of solid modeling that defines the topology of faces, edges, and vertics, as well as data that defines the surface in which each face lies is called:
Programming languages currently available for robots:
A process controller:
Compared to an open-loop system, a closed-loop control system is:
Automation means:
The "snap" command feature in both AutoCAD and VersaCAD ensure that:
An intelligent robot can:
What is proportional control?
The real "brain" of an artificial intelligence system is referred to as:
Analog and digital controllers:
Robot motion:
The digitizing technology that uses an electric field radiated from the tablet and picked up by a cursor is:
Advantages of robots include:
Light sensors:
Stepping motors:
Most continuous control actuators:
Group technology brings together and organizes:
A venturi tube:
The APT (automatically progra¬mmed tools) language is used with:
The ideal solution is to have a system coordinator who will interface with the engineering and manufacturing managers, as well as the:
Four basic elements are required for an automated machine tool or production process. They are: input interface, memory, output interface and:
The Ziegler-Nichols method:
A Hall effect switch is usually used to:
The hardware device Jhat acts as both a switching and connecting unit is called a(n):
The addition of _____ can reduce processing time.
Which of the following method is used the results of a design analysis as a base for redesign decisions?
What kind of capability is required if one plans to interface with a plotter or printer?
Robots can increase productivity because:
Which CAD display configurability allows work without any host support?
The rectangular boundary around a specific area on the display is called
In the PROLOG language system, facts are manipulated by:
A favourable reason for automation is to:
Which method uses the design analysis as a method for effecting the design?
The main activity(ies) of Designer in CAD is/are:
The three different types of pen plotter technology are flatbed, drum, and:
High-level languages:
The heart of automation technology is.
A dc servo motor:
Plotter accuracy is measured in terms of repeatability and:
The basic difference between broadband and baseband is:
The power source that drives the manipulator can be:
Which of the following devices would be classified as a robot by the Robot Institute of America?
An operating system:
A LISP environment consists of a language, a programming environ¬ment, and:
What Is a process variable?
Time proportioning control:
What is the process lag?
If the present value in a timer in the TI510 is 8, how many milliseconds is required from the time the timer is started until the output is enabled?
The two types of relays in a PC are:
A common way to take x, y coordinates off a drawing is to use a
How is the integral mode implemented on a digital controller?
Which of the following is not critical in PC CAD software?
Which of the following editor(s) is(are) incorporated into general CAD system?
A microprocessor:
Which document sums up the general provisions of purchase, terms and agreement, warranties, and maintenance?
Which of the plotters listed below eliminates media size limitations?
In order to combat foreign competition, U.S. companies are:
Historically, central systems were used because:
Most current PC CAD systems are used for producing:
A continuous process is:
The rate at which scanning is repeated is called the:
One of the following is not considered a method of input control in a CAD system.
Which part of the system performs the "housekeeping" chores?
The greatest change as a result of CAD/CAM is taking place in which industry?
Who are called steel collar workers?
For a type 1 system, the steady-state:
Several objectives are required to achieve a successful data base management program. These are availability of data, quality of data, and
Which of the following is required for a plotter to perform specific commands?
For a type 2 system, the steady-state:
The refresh-vector CRT uses which of the following techniques?
A set of well-defined procedures based on mathematical and geometric formulas for solving a problem in a finite number of steps is called:
A flexible manufacturing system may be:
Which of the following elements can be used with a TI510 FC?
For a type 0 system, the steady-state:
An assembly language instruction:
The lowest form of computer language is called:
CAE and CAM are linked through:
The parallel register:
Microcomputer-based control sys¬tems
A thermistor:
The steady-state error is:
Many things can be done to minimize downtime loss. Identify two of them.
A typical NC system has which of the following components?
Which part of the system allows the user to interact with the compiler? (a) Memory
The robot:
Direct Numerical Control means:
A proportional plus integral contro¬ller can:
A pick-and-place manipulator is:
FORTRAN is:
Which of the methods below can be used to tell a robot what it is to do?
The processing, which normally consists of a small computer with one or more peripheral devices, connected via a high-speed line to the large control computer is known as
VLSI (very large scale integrated circuits) logic:
The term used to represent the recycling of unused memory is:
In the instruction, 500 SUBA # 50 the command field is:
Use of modern control technology in automation systems:
One of the major benefits of using CAD in tool design is that:
The speed at which the monitor accepts data is called:
The chosen language for the Japanese Fifth-Generation Compu¬ter Project is:
When a computer fetches an instruction, the binary code representing the instruction appears on the:
A stepping motor;
A microprocessor is:
An up/down counter used in a TI510PC has three inputs. Which of the following is not one of them?
If a sine wave has a frequency of 500 Hz, the period in seconds of the sine wave is:
Standard computer control products:
Skipping every other line and picking up the skipped lines on the second pass is called:
Ergonomics refers to:
Artificial intelligence operates on the principle of using a _____ base as opposed to a data base.
A smart solid-state sensor is:
D/A (digital to analog) conversion:
Most data transmission in the future will be:
The integrated circuit:
What is offset error?
Which of the following may be classified as an automation system?
The accuracy of a pick-and-place robot can be as good as:
The difference between CAD and CAM is that CAD software is directed at product design while CAM software is:
Localizing an object in an image and selectively analyzing the object in a series of redundant layers is referred to as the:
In the operation of a programmable controller:
The concept of a general CAD system was that it should provide:
The insect type robot Attila is a more competent version of the robot Genghis an weights 1.7 kg. What is the number of microprocessors carried by its body?
The "walk-through" method of programming a robot involves:
Which of the following is often used as an alternative to the light pen or in association with storage tube displays?
The general CAD system was development by considering a wide range of possible uses of such a system.
Relay ladder logic is used in a PC because:
The "end-effector" of a robot:
The program execution time:
One advantage of a PC in industrial control is that it:
When one must sell a project to management, the most important document he or she can produce is a:
What is required to enable the PC to emulate a graphics terminal?
Which type of digitizer measures a wave traveling at the speed of sound?
An encoder:
Operator interaction directly with the CRT is accomplished via:
What two disciplines are usually tied by a common data base?
Which of the following is a graphical output device?
A display of a volume model that shows all of its edges is called a:
A sequence controller:
Having compatibility and commonality in and between vendors' equipment is called:
Programmable controllers:
Which of the following are kinds of instructions?
What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array?
What does the following declaration mean? int (*ptr)[10];
In C, if you pass an array as an argument to a function, what actually gets passed?
What will be the output of the program if the array begins at 65472 and each integer occupies 2 bytes? #include<stdio.h> int main() { int a[3][4] = {1, 2, 3, 4, 4, 3, 2, 1, 7, 8, 9, 0}; printf("%u, %u\n", a+1, &a+1); return 0; }
What will be the output of the program in Turb C (under DOS)? #include<stdio.h> int main() { int arr[5], i=0; while(i<5) arr[i]=++i; for(i=0; i<5; i++) printf("%d, ", arr[i]); return 0; }
What will be the output of the program ? #include<stdio.h> int main() { int arr[1]={10}; printf("%d\n", 0[arr]); return 0; }
What will be the output of the program if the array begins at address 65486? #include<stdio.h> int main() { int arr[] = {12, 14, 15, 23, 45}; printf("%u, %u\n", arr, &arr); return 0; }
What will be the output of the program ? #include<stdio.h> int main() { float arr[] = {12.4, 2.3, 4.5, 6.7}; printf("%d\n", sizeof(arr)/sizeof(arr[0])); return 0; }
What will be the output of the program if the array begins 1200 in memory? #include<stdio.h> int main() { int arr[]={2, 3, 4, 1, 6}; printf("%u, %u, %u\n", arr, &arr[0], &arr); return 0; }
What will be the output of the program ? #include<stdio.h> int main() { int a[5] = {5, 1, 15, 20, 25}; int i, j, m; i = ++a[1]; j = a[1]++; m = a[i++]; printf("%d, %d, %d", i, j, m); return 0; }
What will be the output of the program ? #include<stdio.h> int main() { static int a[2][2] = {1, 2, 3, 4}; int i, j; static int *p[] = {(int*)a, (int*)a+1, (int*)a+2}; for(i=0; i<2; i++) { for(j=0; j<2; j++) { printf("%d, %d, %d, %d\n", *(*(p+i)+j), *(*(j+p)+i), *(*(i+p)+j), *(*(p+j)+i)); } } return 0; }
What will be the output of the program ? #include<stdio.h> int main() { void fun(int, int[]); int arr[] = {1, 2, 3, 4}; int i; fun(4, arr); for(i=0; i<4; i++) printf("%d,", arr[i]); return 0; } void fun(int n, int arr[]) { int *p=0; int i=0; while(i++ < n) p = &arr[i]; *p=0; }
What will be the output of the program ? #include<stdio.h> void fun(int **p); int main() { int a[3][4] = {1, 2, 3, 4, 4, 3, 2, 8, 7, 8, 9, 0}; int *ptr; ptr = &a[0][0]; fun(&ptr); return 0; } void fun(int **p) { printf("%d\n", **p); }
What will be the output of the program ? #include<stdio.h> int main() { static int arr[] = {0, 1, 2, 3, 4}; int *p[] = {arr, arr+1, arr+2, arr+3, arr+4}; int **ptr=p; ptr++; printf("%d, %d, %d\n", ptr-p, *ptr-arr, **ptr); *ptr++; printf("%d, %d, %d\n", ptr-p, *ptr-arr, **ptr); *++ptr; printf("%d, %d, %d\n", ptr-p, *ptr-arr, **ptr); ++*ptr; printf("%d, %d, %d\n", ptr-p, *ptr-arr, **ptr); return 0; }
Which of the following is correct way to define the function fun() in the below program? #include<stdio.h> int main() { int a[3][4]; fun(a); return 0; }
Which of the following statements mentioning the name of the array begins DOES NOT yield the base address? 1: When array name is used with the sizeof operator. 2: When array name is operand of the & operator. 3: When array name is passed to scanf() function. 4: When array name is passed to printf() function.
Which of the following statements are correct about the program below? #include<stdio.h> int main() { int size, i; scanf("%d", &size); int arr[size]; for(i=1; i<=size; i++) { scanf("%d", arr[i]); printf("%d", arr[i]); } return 0; }
Which of the following statements are correct about 6 used in the program? int num[6]; num[6]=21;
Which of the following statements are correct about an array? 1: The array int num[26]; can store 26 elements. 2: The expression num[1] designates the very first element in the array. 3: It is necessary to initialize the array at the time of declaration. 4: The declaration num[SIZE] is allowed if SIZE is a macro.
In which numbering system can the binary number 1011011111000101 be easily converted to?
Which bitwise operator is suitable for turning off a particular bit in a number?
Which bitwise operator is suitable for turning on a particular bit in a number?
Which bitwise operator is suitable for checking whether a particular bit is on or off?
What will the SWAP macro in the following program be expanded to on preprocessing? will the code compile? #include<stdio.h> #define SWAP(a, b, c)(c t; t=a, a=b, b=t) int main() { int x=10, y=20; SWAP(x, y, int); printf("%d %d\n", x, y); return 0; }
In which stage the following code #include<stdio.h> gets replaced by the contents of the file stdio.h
What will be the output of the program? #include<stdio.h> #define PRINT(int) printf("int=%d, ", int); int main() { int x=2, y=3, z=4; PRINT(x); PRINT(y); PRINT(z); return 0; }
What will be the output of the program? #include<stdio.h> #define SWAP(a, b) int t; t=a, a=b, b=t; int main() { int a=10, b=12; SWAP(a, b); printf("a = %d, b = %d\n", a, b); return 0; }
What will be the output of the program? #include<stdio.h> #define FUN(i, j) i##j int main() { int va1=10; int va12=20; printf("%d\n", FUN(va1, 2)); return 0; }
What will be the output of the program? #include<stdio.h> #define FUN(arg) do\ {\ if(arg)\ printf("IndiaBIX...", "\n");\ }while(--i) int main() { int i=2; FUN(i<3); return 0; }
What will be the output of the program? #include<stdio.h> #define MAX(a, b) (a > b ? a : b) int main() { int x; x = MAX(3+2, 2+7); printf("%d\n", x); return 0; }
What will be the output of the program? #include<stdio.h> #define MIN(x, y) (x<y)? x : y; int main() { int x=3, y=4, z; z = MIN(x+y/2, y-1); if(z > 0) printf("%d\n", z); return 0; }
What will be the output of the program? #include<stdio.h> #define str(x) #x #define Xstr(x) str(x) #define oper multiply int main() { char *opername = Xstr(oper); printf("%s\n", opername); return 0; }
What will be the output of the program? #include<stdio.h> #define MESS junk int main() { printf("MESS\n"); return 0; }
What will be the output of the program? #include<stdio.h> #define PRINT(i) printf("%d,",i) int main() { int x=2, y=3, z=4; PRINT(x); PRINT(y); PRINT(z); return 0; }
What will be the output of the program? #include<stdio.h> #define MAX(a, b, c) (a>b ? a>c ? a : c: b>c ? b : c) int main() { int x; x = MAX(3+2, 2+7, 3+7); printf("%d\n", x); return 0; }
What will be the output of the program? #include<stdio.h> #define MAN(x, y) ((x)>(y)) ? (x):(y); int main() { int i=10, j=5, k=0; k = MAN(++i, j++); printf("%d, %d, %d\n", i, j, k); return 0; }
What will be the output of the program? #include<stdio.h> #define SQUARE(x) x*x int main() { float s=10, u=30, t=2, a; a = 2*(s-u*t)/SQUARE(t); printf("Result = %f", a); return 0; }
What will be the output of the program? #include<stdio.h> #define SQR(x)(x*x) int main() { int a, b=3; a = SQR(b+2); printf("%d\n", a); return 0; }
What will be the output of the program? #include<stdio.h> #define JOIN(s1, s2) printf("%s=%s %s=%s \n", #s1, s1, #s2, s2); int main() { char *str1="India"; char *str2="BIX"; JOIN(str1, str2); return 0; }
What will be the output of the program? #include<stdio.h> #define CUBE(x) (x*x*x) int main() { int a, b=3; a = CUBE(b++); printf("%d, %d\n", a, b); return 0; }
Which of the following are correct preprocessor directives in C? 1: #ifdef 2: #if 3: #elif 4: #undef
Which of the following are correctly formed #define statements in C?
Point out the error in the program #include<stdio.h> #define SI(p, n, r) float si; si=p*n*r/100; int main() { float p=2500, r=3.5; int n=3; SI(p, n, r); SI(1500, 2, 2.5); return 0; }
Point out the error in the program #include<stdio.h> int main() { int i; #if A printf("Enter any number:"); scanf("%d", &i); #elif B printf("The number is odd"); return 0; }
The maximum combined length of the command-line arguments including the spaces between adjacent arguments is
According to ANSI specifications which is the correct way of declaring main when it receives command-line arguments?
What do the 'c' and 'v' in argv stands for?
What will be the output of the program (sample.c) given below if it is executed from the command line? cmd> sample "*.c" /* sample.c */ #include<stdio.h> int main(int argc, int *argv) { int i; for(i=1; i<argc; i++) printf("%s\n", argv[i]); return 0; }
What will be the output of the program if it is executed like below? cmd> sample /* sample.c */ #include<stdio.h> int main(int argc, char **argv) { printf("%s\n", argv[argc-1]); return 0; }
What will be the output of the program (sample.c) given below if it is executed from the command line? cmd> sample friday tuesday sunday /* sample.c */ #include<stdio.h> int main(int argc, char *argv[]) { printf("%c", **++argv); return 0; }
What will be the output of the program (myprog.c) given below if it is executed from the command line? cmd> myprog friday tuesday sunday /* myprog.c */ #include<stdio.h> int main(int argc, char *argv[]) { printf("%c", *++argv[1]); return 0; }
What will be the output of the program (sample.c) given below if it is executed from the command line? cmd> sample one two three /* sample.c */ #include<stdio.h> int main(int argc, char *argv[]) { int i=0; i+=strlen(argv[1]); while(i>0) { printf("%c", argv[1][--i]); } return 0; }
What will be the output of the program in Turbo C? #include<stdio.h> int main(int argc, char *argv, char *env[]) { int i; for(i=1; i<argc; i++) printf("%s\n", env[i]); return 0; }
What will be the output of the program (sample.c) given below if it is executed from the command line? cmd> sample Jan Feb Mar /* sample.c */ #include<stdio.h> #include<dos.h> int main(int arc, char *arv[]) { int i; for(i=1; i<_argc; i++) printf("%s ", _argv[i]); return 0; }
What will be the output of the program (sample.c) given below if it is executed from the command line? cmd> sample monday tuesday wednesday thursday /* sample.c */ #include<stdio.h> int main(int argc, char *argv[]) { while(--argc>0) printf("%s", *++argv); return 0; }
If the following program (myproc.c) is present in the directory "C:\TC" then what will be output of the program if run it from DOS shell? /* myproc.c */ #include<stdio.h> int main(int argc, char *argv[]) { printf("%s", argv[0]); return 0; }
What will be the output of the program (myprog.c) given below if it is executed from the command line? cmd> myprog one two three /* myprog.c */ #include<stdio.h> int main(int argc, char *argv[]) { int i; for(i=1; i<argc; i++) printf("%c", argv[i][0]); return 0; }
What will be the output of the program (sample.c) given below if it is executed from the command line? cmd> sample 1 2 3 cmd> sample 2 2 3 cmd> sample 3 2 3 /* sample.c */ #include<stdio.h> int main(int argc, char *argv[]) { printf("%s\n", argv[0]); return 0; }
What will be the output of the program (myprog.c) given below if it is executed from the command line? cmd> myprog 1 2 3 /* myprog.c */ #include<stdio.h> #include<stdlib.h> int main(int argc, char **argv) { int i, j=0; for(i=0; i<argc; i++) j = j+atoi(argv[i]); printf("%d\n", j); return 0; }
What will be the output of the program (sample.c) given below if it is executed from the command line? cmd> sample friday tuesday sunday /* sample.c */ #include<stdio.h> int main(int sizeofargv, char *argv[]) { while(sizeofargv) printf("%s", argv[--sizeofargv]); return 0; }
What will be the output of the program (sample.c) given below if it is executed from the command line? cmd> sample friday tuesday sunday /* sample.c */ #include<stdio.h> int main(int argc, char *argv[]) { printf("%c", *++argv[2] ); return 0; }
What will be the output of the program (myprog.c) given below if it is executed from the command line? cmd> myprog 10 20 30 /* myprog.c */ #include<stdio.h> int main(int argc, char **argv) { int i; for(i=0; i<argc; i++) printf("%s\n", argv[i]); return 0; }
What will be the output of the program (myprog.c) given below if it is executed from the command line? cmd> myprog one two three /* myprog.c */ #include<stdio.h> #include<stdlib.h> int main(int argc, char **argv) { int i; for(i=1; i<=3; i++) printf("%u\n", &argv[i]); return 0; } If the first value printed by the above program is 65517, what will be the rest of output?
What will be the output of the program (myprog.c) given below if it is executed from the command line? cmd> myprog one two three /* myprog.c */ #include<stdio.h> int main(int argc, char **argv) { printf("%c\n", **++argv); return 0; }
What will be the output of the program (myprog.c) given below if it is executed from the command line? cmd> myprog one two three /* myprog.c */ #include<stdio.h> #include<stdlib.h> int main(int argc, char **argv) { printf("%s\n", *++argv); return 0; }
What will be the output of the program (sample.c) given below if it is executed from the command line (Turbo C in DOS)? cmd> sample 1 2 3 /* sample.c */ #include<stdio.h> int main(int argc, char *argv[]) { int j; j = argv[1] + argv[2] + argv[3]; printf("%d", j); return 0; }
What will be the output of the program (sample.c) given below if it is executed from the command line (turbo c under DOS)? cmd> sample Good Morning /* sample.c */ #include<stdio.h> int main(int argc, char *argv[]) { printf("%d %s", argc, argv[1]); return 0; }
What will be the output of the program #include<stdio.h> void fun(int); int main(int argc) { printf("%d ", argc); fun(argc); return 0; } void fun(int i) { if(i!=4) main(++i); }
Which of the following is TRUE about argv?
Which of the following statements are FALSE about the below code? int main(int ac, char *av[]) { }
Declare the following statement? "A pointer to a function which receives an int pointer and returns float pointer".
What do the following declaration signify? void *cmp();
Declare the following statement? "A pointer to a function which receives nothing and returns nothing".
What do the following declaration signify? int *f();
What do the following declaration signify? void (*cmp)();
What do the following declaration signify? char **argv;

No comments:

Post a Comment