answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What action best describes a branch in a computer program?

This would be a jump to a line number that is non sequential. This is the best way to describe the process.

How would you use the functions fseek freed fwrite and ftell?

fread(s,i1,i2,f) Enter i2 dataitems,each of size i1 bytes,from file f to string s.

fseek(f,1,i) Move the pointer for file f a distance 1 byte from location i.

ftell(f) Return the current pointer position within file f.

fwrite(s,i1,i2,f) send i2 data items,each of size i1 bytes from string s to file f.

The data type returned for functions fread,fseek and fwrite is int and ftell is long int.

What is size of far pointer?

In real mode far pointers are 32 bit long (segment + offset)

In protected mode 48 bit (16 bit segment + 32 bit offset)

(In 64-bit mode 80 bit (16 nit segment + 64 bit offset) but it's not so useful)

How do you edit the legends of charts in Crystal Reports?

In Crystal Reports XI you must buy the real version to edit legend text labels. Then you just select and right-click etc. This feature is not available in the Lite version with Visual Studio for instance. Call businessobjects.com to confirm.

Are DMA channels part of a system resource?

Formally no, since 'resource' refers to something consumable, like RAM or CPU time. Rather, DMA channels are encountered to be a part of hardware infrastructure.

What is loop logic structure?

I believe it is:

Loop condition

Loop actions

And how the loop breaks

What is a bit- in computer terms is it a character- in language terms is it a syllable?

A bit is the smallest piece of data that a computer (digital) can process. Several bits make up a byte. It started out as 4 bit and 8 bit processors. The earlest processers commercially available were 8 bit capable now there are 128 bit and possible in the near future. With each increase in bits also increased the instruction set that went with those processors. 8 Bits could up to 255 instructions in the operating set.

The bit is to the byte as the letter is to a word.

You accidentally partitioned your c drive and installed windows xp. how do i uninstall windows xp from the c drive and then unpartition the drives?

You cannot reverse such process especially after you have installed the os. But if you remember the old partition size you can format the disk again, delete partitions which you don't need and create a partition which you want to have.

What does Emerson compare an iron string to?

"Trust thyself; every heart vibrates to that iron string."

Iron string = belief in ones own thoughts, to be self confident.

Program to find area of circle using class in c?

class area{ int l,w,a; a=i*w; printf"area of rectangle is= %d",a; endl; }

What is the newest prgramming language?

depends on the application you wish to produce ..... dot NET is probably the best for windows apps

What is the difference between compiler and profiler?

A profiler examines source code or machine code to determine memory and performance complexities, usage of certain instructions and the frequency and duration of function calls. Profilers are used as an aid to optimising code during the performance engineering phase of development.

A compiler processes source code to produce machine code. A compiler also optimises the emitted code through inline expansion, compile-time computations, tail-call recursions, code re-ordering and so on. Compiler optimisations are well-defined, but the analysis is primitive compared to profiling which performs more extensive and time-consuming analysis of the code.

What makes a parameter a constant reference?

In C++, the const modifier makes a reference a constant reference.

int i = 42;

const int& r = i;

In the above example, both r and i refer to the same object: a primitive integral with the value 42. That is, r is an alias for i; they are one and the same object. However, the reference r is declared constant so we cannot change the object it refers to by assigning a new value to it. But we can assign a new value to i. And since r and i are the same object, the value of r also changes, despite being decalred constant.

Normally you would not use a constant reference to refer to a local object, since the constness of the reference cannot be guaranteed. However, when we pass an object to a function that expects a constant reference to an object, we give a gurantee to the caller that the object's immutable members will not be changed by the function. This is because the function only has access to the object through the constant reference (formal argument), not the reference we actually passed (actual argument). Therefore it only has access to the constant member functions.

Note that mutable members are nonstatic members that are declared mutable. Typically these will be declared private, for internal use only, such as counters or iterators. As such, modifying a mutable member does not alter an object's external state, as defined by its immutable members. This allows us to invoke constant member functions, which assures us that the object's external state remains unchanged, regardless of the internal state.

Mutable members can also be used to enable lazy construction. That is, an accessor initialises a complex embedded member object when it is first accessed, rather than during construction. This allows the containing object to be constructed much faster, provided the accessor is not invoked as part of the construction process of course. In order for this to work, the embedded member must be a mutable pointer that is initially NULL. When the accessor is invoked for the first time, the complex member is constructed and assigned to the NULL pointer which is then returned (usually by constant reference, but not always). Thereafter, the pointer is no longer NULL and can simply be returned on subsequent accesses. The main advantage of lazy construction is that if the accessor is never called before the containing object falls from scope, we don't waste time and memory constructing an embedded object that was never actually required (and if we had a thousand containing objects, we'd be constructing a thousand embedded objects for no good reason). However, all accessors must be declared constant as they must be accessible to all other member functions, including constant member functions. If the member were not mutable, lazy construction of that member becomes impossible.

What are environment variables?

Environment variables are a set of dynamic values that can

affect the way running processes will behave on a computer.