answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What are the disadvantages of switch statement in C-language?

In some languages and programming environments, a case or switch statement is considered easier to read and maintain than an equivalent series of if-else statements, because it is more concise.

However, when implemented with fall-through, switch statements are a frequent source of bugs among programmers new to the switch statement.

Architecture of expert expert system?

expert system architecture need to act like the process expert attempt to do for reasoning based on the given facts. architecture comprise of interface, explanation system, inference engine and knowledge editor as a shell,which can be configured on different knowledge area without changing the whole structure of expert system, and the removable part constitute of domain-specific and general knowledge section. in general knowledge section refer to those knowledge representation(usually in the form of ruled-based) symbols which is needed for expert system to running. domain-specific refer to those facts that entered by user or is the conclusion of the last operation in inference part. resemble it to individual experts, general knowledge section have a role of long-terms memory and domain specific have role of working memory which is manipulated or updated by inference engine. in fact inference engine use both of this storage for reasoning and making inference about the problem. generally inference engines use recognize-act chain in order to solve the problem. process of problem solving in forward chaining method for inference start with typing of problem from GUI by user, the facts go into domain specific storage,in this part the first action on recognition-action cycle of inference engine take place. all of the facts in domain-specific storage being compared with rules in general knowledge storage. this part is called matching, after that inference engine need choose the most appropriate one from conflict set(set of rules in matched in first step). for this purpose it may use conflict resolution strategy which is the job of interpreter. interpreter is part of the inference engine that execute selected agenda based on the given criteria. what will happen then is selection of rule based on namely three main category of strategy:1-in the case of two or more condition use the one that are more specific 2-if two or more rule have appropriate condition for selection use the one used in facts 3-if system match the same condition for two different role the latest rule need to be eliminated because iteration may take place. after selection of rule execution part start if executed result is the one desired problem is solved if not, result store in domain-specific section and cycle renewed. the process of inference engine is the same for back-ward and forward chaining what make difference is the load and reload of working memory and other things.(and this is the thing that u need to find out!). explanation system which is part of the shell(you can see more about shell by searching on wikianswer ;)). explanation system provide description about why expert system decide on particular course of action and how it conclude to this result. mechanism counterintutivelly simple. explanation system just exploit the knowledge pattern it followed during the work of inference engine. it track back use storage to find out what have been decided and how inference engine imply based on th rules.(just like it's human counter part) i don't know much about the detailed flow of work in explanation systems but i really love to. knowledge editor as its name imply manipulate the general knowledge storage, adding , deleting and changing undertake by knowledge engineer but knowledge editor written by professional programmer. hope this would help but again check other places because there s lot more u need to know.good luck have fun!

What is profit oriented entite?

A profit-oriented entity is an organization or business whose primary goal is to generate profit for its owners or shareholders. This type of entity focuses on maximizing revenues while minimizing costs, often prioritizing financial performance and shareholder value. Profit-oriented entities can include corporations, partnerships, and sole proprietorships that operate in various industries. Their success is typically measured by financial metrics such as net income and return on investment.

What is counter loop?

A counted loop is a loop that executes the loop's statement a pre-determined number of times. The count represent the exit condition of the loop. A loop that is not counted is an infinite loop.

What is the difference between open source and closed source software?

commercial software is made for profit. it is maintained by a company, and it's code is a trade secret, hidden, "closed source", because you can't see it (and therefore steal it)

open source software is free to use. it is created not for profit, typically maintained by a community of individuals. its code is free for everyone to look at, modify, steal, etc.

sometimes you will have trouble downloading open source software - make sure you download the "windows binaries" or "windows compile" and not the source code

What is the difference between Procedural programming and Markup?

The way I understand it Markup Language is used for adding extra features, like structure or presentation of the text, objects etc.

Programming language is used for creating programs.

Basically in the example of the car, markup languagewould be the tools used to create the body and design, and programming language - the tools used to build an engine.

What is function of include in c language?

The #include directive is used to tell the preprocessor that the specified file's contents are to be included at the point where the directive appears, just as if you'd typed those contents in full yourself.

Include files are primarily used to organise declarations of external variables and functions, complex data types, constants and macro definitions. The code need only be declared once, and included wherever required. Think of include files as a means of providing forward declarations without having to retype those declarations in full. The definitions of those declarations needn't be contained in the included file, but they must be made available to the program, either as a linked library or as a separate source code file which includes those same declarations.

The include keyword is used in C to tell the linker what libraries your code is going to be using.

What is the answer to computer networking a top-down approach featuring the internet 3rd by kurose ross chapter1 question 18?

According to computer networking: a top-down approach, the transmission rate of Ethernet LAN is 10 Mbps, 100 Mbps, 1 Gbps and 10 Gbps. Maximum rate can be transmitted to a destination that is not being transmitted to by other users.

How do you draw object oriented design of Library Management System?

well ladies and gentelmen kal hai shanivar is the...post office me banta hai card adhaar is the!! :p

NOW seriously,,,take a paper and make the gola with pencil, and take a actor with straight hands and legs and join the gola with the actor using teer..

and u will have ur pyaara data flow diagram.

What are the objectives of Job Data Documentation?

Objectives or Purposes of Job Analysis

Conducting this analysis provides support for the accomplishment of your organization's strategic business objectives.

The list of objectives will include the following:

to assist in the preparation of up-to-date job description and job specification

to ensure effectiveness of recruitment exercises

to aid in formulating an effective performance management system

With reference to recruitment, Wikipedia states that

"the main purpose of conducting job analysis is to prepare job description and job specification which in turn helps to the hire right quality of workforce..."

It must also meet your employees' needs. This is shown by the way how job analysis can assist in designing a good performance management system.

How do you open a Qbasic file?

QBASIC GRAPHICS

There any many different things you can draw in QBASIC; ranging from...

-dots

-lines

-rectangles

-circles

-shapes empty/or, filled in(painted)

-you can even do LOGO style programming to draw graphics with; by joining up connected lines

-animations are possible, too

====

QBASIC BUILT-IN HELP FILE + CODE EXAMPLES

In order to view the QBASIC built-in Help file...; first, load the QBASIC program itself...; and, then, do a combination key press of:

[SHIFT] + [F1]

Use the built-in QBASIC Help file to learn more about how to use these 'graphic related' commands, and, more...!

The QBASIC Help file also contains plenty of 'example codes'; which you can just use 'copy & paste'; then, RUN...to see what the output effect will be...???

Write an Assembly language program to multiply 32 bit numbers?

.data mult1 dw 2521H dw 3206H mult2 dw 0A26H dw 6400H ans dw 0,0,0,0 .code mov ax,@data mov ds,ax ; LEA SI,ans mov ax,mult1 mul mult2 mov ans,ax mov ans+2,dx mov ax,mult1+2 mul mult2 add ans+2,ax adc ans+4,dx adc ans+6,0 mov ax,mult1 mul mult2+2 add ans+2,ax adc ans+4,dx adc ans+6,0 mov ax,mult1+2 mul mult2+2 add ans+4,ax adc ans+6,dx mov ax,4C00h int 21h end

What are the advantages and disadvantages of stacks and queues in data structure?

Stack and Queue have elements enter and leave frequently, and the total number of elements within the container (the stack or the queue) may be unpredictable. That is, the size of the container may be 0 or very huge.

Array is a fixed size collection. When adding an element, if the array is already full, it cannot simply add another "slot" to hold the new entry. The program must create another array instance that is big enough to hold the original elements and the new comers, which means all the elements must be "moved" from the current array to the newly created one.

Linked list has the advantage of easily adding and removing a node (to hold an element) and keep the ones already in the list untouched.

Write a program to insert or delete a node from doubly linked list?

Encoder:- In character recognition, that class of printer which is usually designed for the specific purpose of printing a particular type font in predetermined positions on certain size forms.

(electronics) In an electronic computer, a network or system in which only one input is excited at a time and each input produces a combination of outputs. encoder http://www.answers.com/main/Record2?a=NR&url=http%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FImage%3AEncoder%2520diagram.svg http://www.answers.com/main/Record2?a=NR&url=http%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FImage%3AEncoder%2520diagram.svg Circuit diagram of a single bit 4-to-2 line encoder A3A2 A1 A0 F1 F0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 Encoder:- In character recognition, that class of printer which is usually designed for the specific purpose of printing a particular type font in predetermined positions on certain size forms.

(electronics) In an electronic computer, a network or system in which only one input is excited at a time and each input produces a combination of outputs. encoder http://www.answers.com/main/Record2?a=NR&url=http%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FImage%3AEncoder%2520diagram.svg http://www.answers.com/main/Record2?a=NR&url=http%3A%2F%2Fcommons.wikimedia.org%2Fwiki%2FImage%3AEncoder%2520diagram.svg Circuit diagram of a single bit 4-to-2 line encoder A3A2 A1 A0 F1 F0 0 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 Truth table

What is assembler and interpreter?

There are two types of assemblers based on how many passes through the source are needed to produce the executable program.

  • One-pass assemblers go through the source code once. Any symbol used before it is defined will require "errata" at the end of the object code (or, at least, no earlier than the point where the symbol is defined) telling the linker or the loader to "go back" and overwrite a placeholder which had been left where the as yet undefined symbol was used.
  • Multi-pass assemblers create a table with all symbols and their values in the first passes, then use the table in later passes to generate code.

What is the purpose of programming languages?

C is often used for "system programming", including implementing operating systems and embedded system applications, due to a combination of desirable characteristics such as code portability and efficiency, ability to access specific hardware addresses, ability to pun types to match externally imposed data access requirements, and low runtime demand on system resources.

When to use prototyping?

Prototyping is used on large or complicated systems so the user can get a feel for the overall functionality of the system. When using a prototype, errors and confusing or missing functionality can be addressed quickly.

List the 4 characteristics of annelids?

they eat many things they can be scavengers, blood suckers , eat bacteria and they can eat decaying matter.

Annelids are worms that get their name from the Latin word meaning "ring" because their bodies are generally segmented,or divided into rings.There are about 9,000 species in there main grouping,

The annelids include earthworms, polychaete worms, and leeches. All members of the group are to some extent segmented, in other words, made up of segments that are formed by subdivisions that partially transect the body cavity. Segmentation is also called metamerism. Segments each contain elements of such body systems as circulatory, nervous, and excretory tracts. Metamerism increases the efficiency of body movement by allowing the effect of muscle contraction to be extremely localized, and it makes possible the development of greater complexity in general body organization.

Besides being segmented, the body wall of annelids is characterized by being made up of both circular and longitudinal muscle fibers surrounded by a moist, acellular cuticle that is secreted by an epidermal epithelium. All annelids except leeches also have chitonous hair-like structures, called setae, projecting from their cuticle. Sometimes the setae are located on paddle-like appendages called parapodia.

Earthworms include mainly ground-living burrowing worms.They help to make the soil fit for plants to grow in.They make burrows which keep the top layer of soil loose and fresh,and swallow soil which passes through their bodies and returns again to the soil in a form which can be easily absorbed by the roots of plants(see earthworm).The group also includes a freshwater types such as bright red bloodworms that live in mud and are used to feed aquarium fish.

Marine worms are a smaller group that live mainly in the sea.Either they swim or shimmy around rocks and feed on small animals(see Ragworm),or else they in tubes and extend their tentacles to catch plankton,or filter small animals from mud or sand.The worm casts found low down on sandy Atlantic beaches are formed by the lugworm.

Leeches make up the third group of segmented worms.There are only 300 known species.All feed on blood.

What is Double Linked List?

The singly link list is nothing but the group of memory location in the computer memory (RAM) connected with each other using the pointer. The pointer is nothing but the location in the memory address space . The single data in list is called as nodes. Every nodes contain data and the pointer to the next data. Means one pointer in the node gives location of the next data. Suppose i have following data Memory location Data 1000 A 2000 B 3000 C since the my data A,B,C is stored in different memory locations , i can group it using singly linklist . Means my first node contain data A ,second B, & third C . The first node which contain data A will give the information about the next data or node (which is B) using the pointer. Means the pointer of A store the memory location of B (which is 2000).Like these the link will continued , at last node since there is no next node or data . Hence the pointer contain NULL value means there is (dead end).When computer encounters NULL it stop travelling through the list. & there is a special pointer called START pointer which gives the mem location of first node. In about example the node which contain data C contain NULL value in pointer field.

Binary search in array in c?

// answer in C-style pseudo-code

// all division should be rounded up

// search will return the index of the number found, or -1 if it was not found

// nums is the array of numbers we're searching through

// num is the specific number we want to find in nums

// current is the index we are currently inspecting

// start is the first index of nums (typically 0)

// end is the last index of nums (typically the length - 1)

// preconditions: nums must be sorted or function is nondeterministic

int search( int[] nums, int num, int current, int start, int end ) {

if( nums[current] end ) { // target not in list

return -1;

}else if( nums[current] > num ) { // search to the left

return search( nums, num, current - ((current - start)/2), start, current );

}else if( nums[current] < num ) { // search to the right

return search( nums, num, current + ((end - current)/2), current, end );

}

}

// convenience function to start the search

int search( int[] nums, int num ) {

return search(nums, num, (nums.length/2), 0, nums.length - 1);

}

What is Abstraction in C?

C is not an object-oriented programming language and therefore has no concept of abstract classes.

In C++, however, an abstract class is a base class that declares one or more pure-virtual functions. An abstract base class is also known as an abstract data type (ADT). Pure-virtual functions differ from virtual functions in that virtual functions are expected to be overridden (but needn't be) while a pure-virtual function must be overridden (but needn't be implemented by the ADT). Once overridden by a derived class, the function reverts to being a virtual function with respect to further derivatives. However, only classes that provide or inherit a complete implementation of the pure-virtual interface can be instantiated in their own right; those that do not are themselves abstract data types.

Which one is the best and efficient sort?

There are a great many sorts, Mergesort and Quicksort being among the most popular. These both have on the order of n*log n expected case runtime, and while Quicksort can get as bad as n^2, this is unlikely due to most implementations using a random pivot.

If you can make the assumption that ONLY NUMBERS will be sorted, you can use RadixSort, which is the fastest known sort for numbers.

As for how to sort in particular programming languages, consult your local API (in C++ it is in the STL's "algorithm" include file).