When can a function prototype be omitted?
when we write definition of a function i.e; body of a function above main() function, then the function prototype be omitted.
-Ramashankar Nayak,M.C.A,Pondicherry University
What is the total number of spanning tree that can be drawn using five labeled vertices?
125 according to Cayley's formula for counting spanning trees.
For a complete graph Kn,
t(kn) = nn-2
where n is the number of vertices.
What are unconditional statements?
An unconditional statement is one which would happen always (unconditionally).
Conditional statement:
if(x > 5)
print "Hello!"
Unconditional statement:
print "Hello!"
This term also comes up when speaking of assembly instructions. An unconditional jump would be a line of assembly which always executes the jump. This is in contrast to a conditional jump (also known as a branch) which will execute the jump only if some statement evaluates to true.
What are the basic properties of Boolean algebra?
Two first order properties are:
Atomic: ∀x x=0 ∨ ∃yy≤x ∧ atom(y)
Atomless: ∀x ¬atom(x)
They are explained at the source I linked.
Why does it take 5 machine cycles in the SHLD instruction of 8085 microprocessor?
How far can computers really predict?
That will vary depending on the real world system being simulated to make the prediction.
Some real world systems are deterministic and simplemaking it easy to make good long term predictions, other systems are perturbed in unpredictable ways making prediction impossible, many real world systems (e.g. the weather) are deterministic but chaotic (i.e. they are very sensitive to undetectably small differences in initial conditions) making them predictable until these tiny differences accumulate to large differences.
For these reasons it is hard to give any simple answer to your question.
Ranking of virtual university in Pakistan?
In Pakistan, ranking of universities is determined by the HEC. The ranking list (alternative link) is available at the following site:
http://www.paked.net/higher_education/hec_university_rankings.htm
How is visual project are saved?
On the file menu click Save Project or Save Project as... When saving a project make sure you save the forms on the project. So that when you open the project the forms will open also.
What is the time complexity of radix sort?
If the range of numbers is 1....n and the size of numbers is k(small no.) then the time complexity will be theta n log..
Inter block gaps are spaces (or gaps) in the recording stream that separate physical records, or blocks. They allow an opportunity for the read/write heads to change mode as necessary.
Why you use for loop inside switch statement?
Because you have to repeat something. (Or you can use while-loop, too.)
You don't - you'll need an Ethernet card for your computer. A regular voice/fax modem is different than a high-speed/network connection, so you need a different 'card' (with a socket that will match your cable). If you can't find a socket that your Ethernet cable fits, then you don't have an Ethernet card installed!
It's obviously the first...no wait, it's the third...or is it the second...my psychic abilities seem to be failing me again, perhaps if you give the "following" memory dump options someone will be possibly be able to help.
What is the address of the last byte in a 512 mega byte memory expressed as a decimal number?
The address of the last byte in a 512 mega byte memory, expressed as a decimal number, is 536,870,911.
List two advantages and two disadvantages of having international standards for network protocols?
Advantages: We have a standard to work on i.e we know that another person working on it wil follow what we do. Secondly as it becomes widely used, the effective usage increases...it becomes easy for people to make applications that use such protocols. Disadvantages: Often standards made tend to limit themselves in a way or the other. Once made it's difficut to change a standard when we have better methods found.
How do you handle a binary overflow?
When adding two signed integrals (x and y) of the same type, the result cannot overflow when they have opposing signs. The result can only be x or y or somewhere in between, and all values in the range x to y are valid regardless of which is the larger. But when they have the same sign, there is a potential for overflow. Given that x + y = z has well-defined behaviour, we can perform the following pseudocode operations to test for an overflow in z:
if x=0 or y=0 then overflow:=false
else if x<0 and y>0 then overflow:=false
else if x>0 and y<0 then overflow:=false
else if x<0 and z>0 then overflow:=true
else if x>0 and z<0 then overflow:=true
else overflow:=false
The following example shows how we can implement this in C:
// Returns true if x + y = z overflows
bool int_sum_overflow (int x, int y, int z) {
if (!x !y (x<0 && y>0) (x>0 && y<0)) return false; return (x<0 && z>0) (x>0 && z<0);
}
When dealing with unsigned integrals, we must test the operation before we perform the operation. This is because overflowing an unsigned integral has undefined behaviour in much the same way that division by zero has undefined behaviour. If we perform the operation first and an overflow occurs, then it's already too late; undefined behaviour has unpredictable consequences. If we're lucky, our program will simply crash and no harm will be done. If not, we have no way of knowing what has happened. Even if our specific implementation provides well-defined behaviour, it cannot be guaranteed across all architectures and cannot be regarded as being portable. Where undefined behaviour is concerned, prevention is always better than cure.
Fortunately, x + y = z is relatively simple to test without the need to evaluate z first. Given that z cannot exceed the maximum unsigned integral without overflowing, it follows that if max - x were less than y then the result will overflow. This can be stated as follows:
if (max-x)<y then overflow:=true
else overflow:=false
Given that max is a well-defined constant, this is trivial to implement. The following example shows how we might implement this in C:
#include<limits.h> // for UINT_MAX
// Returns true if the sum of x and y would overflow:
bool uint_sum_overflow (unsigned x, unsigned y) {
return (UINT_MAX - x) < y;
}
The above examples deal with addition only but we can perform similar tests for subtraction and multiplication operations. Aside from divide by zero, integral division operations present no major problems, although most divisions will result in a truncation of any fractional component.
If we want to improve efficiency then we really have to lift the bonnet and use assembly programming. In the case of unsigned integral addition, we need to test the carry bit in the most significant bit-adder. For signed integrals we need to test both carry out and the carry in bits of the most-significant bit-adder.
What does effectiveness mean in input design?
Effectiveness in input design refers to the degree to which a system accurately captures and processes user inputs to achieve desired outcomes. It involves ensuring that the input methods are intuitive, minimize errors, and meet user needs efficiently. An effective input design enhances user experience and improves overall system performance by facilitating seamless interaction between the user and the system. Ultimately, it aims to optimize the input process while aligning with the overall objectives of the application or system.
What is a supervisor call interrupt?
SVC (supervisor-call): A request from the user-program to the kernel (or supervisor), to do something like open a file, allocate memory, create a new process etc.
In x86 platform SVCs are executed via "INT nn" machine instruction, that's what Intel calls 'software interrupt'.
These are memory locations to store a vast amount of data. Usually a limited no. of variables are handled while programming in GW Basic. Sometimes you need to bother a plenty of variables and this colud make programming tiresome. To save yourself from a lot of manual inputs, Arrays can help you.
Difference between deterministic finite automata and non deterministic finite automata?
A deterministic finite automaton will have a single possible output for a given input. The answer is deterministic because you can always tell what the output will be.
A nondeterministic finite automaton will have at least one input which will cause a "choice" to be made during a state transition. Unlike a DFA, one input can cause multiple outputs for a given NFA.
I dont know how to generate the nos. randomly.I think it should follow some logic.So the following prog is made upon the inputs given by a user.
#include
#include
void main()
{ int a[5][5],i,j,s;
printf("\nEnter elements of the 5X5 matrics:\n");
for(i=0;i<5;i++)
{ for(j=0;j<5;j++)
{ scanf("%d",&a[i][j]);
if(a[i][j]<0 a[i][j]>100)
{ printf("\nThe no. should be between 1 & 100\nEnter Again:");
scanf("%d",&a[i][j]);
}
}
}
printf("\nThe given matrix is:\n");
for(i=0;i<5;i++)
{ for(j=0;j<5;j++)
printf("%d",a[i][j]);
printtf("\n");
}
printf("\nThe sum of each row:");
for(i=0;i<5;i++)
{ for(j=0;j<5;j++)
s+=a[i][j];
printf("%d->%d\n",i+1,s);
}
getch();
}
Hope this would help you.