How do algorithm to find the factorial of a number?
Factorial (n) = n * Factorial (n-1) for all positive values n given Factorial (1) = Factorial (0) = 1.
Pseudo-code:
Function: factorial, f
Argument: positive number, n
IF n<=1 THEN
RETURN 1
ELSE
RETURN n * f(n-1)
END IF
Understanding concurrency.
What is the difference between object oriented and event driven language?
hi, the answer for the above mention question goes like this............
The event driven programming in oops language is very conceptual programig concept, in the event driven program, the user can interact with the user interface by making use of mouse or any other means of controls
'
But in procedural programming , you cannot interact with the user interface through any of the control, u can only and solely interact with the user interface through codes............
so its is rather difficult for the user to interact the user interface through codes
linguistic typology
What is quadratic probing in data structure?
Quadratic probing is a scheme in computer programming for resolving collisions in hash tables.
Quadratic probing operates by taking the original hash value and adding successive values of an arbitrary quadratic polynomial to the starting value. This algorithm is used in open-addressed hash tables. Quadratic probing provides good memory caching because it preserves some locality of reference; however, linear probing has greater locality and, thus, better cache performance. Quadratic probing better avoids the clustering problem that can occur with linear probing, although it is not immune.
What is the use of complementry operator in c?
The bitwise complement or one's complement operator (~) is used to switch the state of all the bits in a value. Thus 1's become 0, and 0's become 1.
One of its many uses is to unset individual bit(s) in a bitmap. We do this with a bitwise AND of the bitmap and the bitwise complement of the bit(s) we want to unset.
Original bitmap: 01011100
Bit to unset: 00000100 (e.g., bit 2 (bits are zero based from right))
// Using one's complement and bitwise AND
~00000100 & 01011100
11111011 (one's complement of bit 2)
&
01011100 (original bitmap)
=
01011000 (original bitmap with bit 2 unset)
Note that this formula works even if bit 2 were already unset:
11111011 (one's complement of bit 2)
&
01011000 (original bitmap, with bit 2 unset)
=
01011000 (original bitmap unchanged)
What is datatype.Define various types of data types?
In c language data types are used to specify the tye of data.
for ex:
int a;
It means "a" is a variable of type integer.
There are two types of data types in c.They are
primary data types are the built in data types and secondary data types are the user defined data types.
eg for primary data types are int,float,char,long,double..
and for secondary are arrays,structures,pointers,unions..
How do you raise a number to a power?
#include <math.h> and link to the math library, then you can use pow(base, exponent).
How is lycra used int film sets?
when they are in the sun .. sun bounces off of them and make it easier to concentrate
What is an aggregate constant?
An aggregate constant is a nonscalar constant which value never change or are not changed during execution of the program.
What are the qualifiers that an int can have at a time?
A signed int can take a value between -32768 to 32767 and an unsigned int can take a value 0 to 65535.
Html vs traditional programming language?
HTML is not a programming language so it is very different to programming languages. HTML is really just for formatting text and laying out pages, what we call marking up a page. So it is a Markup Language. It can't really do anything interactive with you. Web pages that can do things normally have programming code built into them, with languages like Javascript. HTML can't even do simple things like calculations. Calculations are fundamental to programming languages, as are many other things like: making decisions, repeating instructions, storing data, processing data, and many other things. HTML can't do any of those things. HTML borrows some things from programming, like the facility to use comments, encouraging people to lay out their code properly and the use of simple English-like commands.
If people have learned how to use HTML, it is still a big step up to grasp the concepts of programming. There are also very many programming languages, many of them specialising in doing certain kinds of jobs. Many are very complicated and technical and can be quite cryptic, making them hard to learn. They can also be very strict in how you have to do things, and even simple errors can stop your program working. Programming can be very frustrating because of that. You need to learn and understand a lot more things to write programs than you need for creating HTML pages. HTML is a lot less complicated. You can even make some basic mistakes and your page will still work. HTML can be learned very simply and quickly. It is very easy to show someone how to create a simple web page with HTML. So there is a very big difference between HTML and programming languages.
How do I round up to the next largest whole number in C plus plus?
It's either floor(x)+1 or ceil(x) depending on what you want to get for integral x numbers:x or x+1
How do you find largest of two object using operator overloading in c?
I will not use operator overloading in C# to do anything. Operator overloading may lead to one operator has more than 1 semantic meaning. For example, we know 1 + 2 yields 3, and "1" + 2 yields "12". I do not like this overloading of the operator + being used for addition in Number hierarchy, while as the concatenation in strings. That is, one operator (+) has 2 significant semantics.
And the question "find largest of two object" is too vague - what do you mean "largest"? and object? We know apple and orange are 2 objects, but how do you compare them, and find the largest one?????? (size, price or what???)
What is your GPA if you have all a's but 1 c plus?
That depends on how many total classes you have.
In other words, how many 'a's ?
It is after midnight((:
How do you obtain a single value from array?
That depends on the language you use, but I guess you're using C. So, here goes:
int x[10] = {0}; //declare an array with ten indexes (0 thru to 9)
printf("%i\n", x[0]); //print x[0], which should be zero.
How do you get your nested loop to decrement and not increment?
Easy. Change any + to -, any += to -=, any ++ to --
Why loop seal provided in cfbc boiler?
loop seal is provided to stop the material from furnace to return leg back.It works with the help of diffrential pressure.There is the difference in the pressure of air beteen furnace and return leg.
How do you do serial port communication between two computers in Linux using c language?
You should use pppd to define a connection between the two computers, then normal TCP/IP networking (telnet, ftp, http, NFS, SMB etc) will work without any programming.