In a byte MSB is the bit that represents value 2^7, LSB is the bit that represents value 2^0.
Where can one find information about Arr?
ARR stands for Accounting Rate of Return. Information can be found about this from many websites including Money Terms. Financial Dictionary also provides information.
What is the advantage of cin getline over cin?
The getline() function reads a string of characters up to a newline character or a predefined delimiter. Although extracting directly from cin is faster, the onus is on the programmer to ensure the input is valid at all times, and to clear the buffer before accepting new input. Keyboard entry is particularly problematic, thus it is easier to treat each input as a string which can be easily verified and convert to a numeric value where required.
Why you can not use this pointer in static functions?
Because this points to the current object, but static methods don't have a current object (actually this is definition of the static methods).
Among assembly and machine language which is low level language?
They are both low level. Machine code has no abstraction whatsoever so it could be regarded as being no-level rather than low-level. However, there are very few instances where a programmer has to "bang the metal" and write machine code by hand. That's precisely the reason we wrote assemblers and compilers in the first place!
How do you write a program in c for left factoring?
Store both the number in two variable X and Y. Divide X by Y. If remainder is zero then Y is HCF.
Lexicographic order is an order function - a way of sorting information. It is generally a simple and useful way to sort strings. The name comes from the order used in a dictionary, where strings are compared in alphabetical order, from left to right. For more information, see the related link.
How do we tuple initialize a class or structure?
Consider the following structure:
struct X {
int a;
double b;
// ...
};
Here we could initialise with a std::tuple<int, double>. To achieve this we simply define a constructor that accepts the required tuple:
#include<tuple>
struct X {
int a;
double b;
X::X (std::tuple<int, double>& t): a {std::get<0>(t)}, b {std::get<1>(t)} {}
// ...
};
Note that any constructor that has one argument is known as a conversion constructor, in this case converting from tuple to X. It is usually a good idea to declare such constructors explicit, particularly if you also provide the complementary conversion operator (from X to tuple).
#include<tuple>
struct X {
int a;
double b;
explicit X::X (const std::tuple<int, double>& t): a {std::get<0>(t)}, b {std::get<1>(t)} {} operator std::tuple<int, double> (void) const {return std::make_tuple (a, b);}
// ...
};
A stack can be implemented as?
One way to implement a stack is with a singly-linked list. The head pointer always points to the "top of the stack", and each element points to the next. Since you rarely, if ever, are interested in more than the top of the stack, this is one way, although not the most efficient way, to implement a dynamic stack.
Since a stack is an abstraction, the best way to do this is to use a C++ abstract class or JAVA interface, as that would allow you to fine tune the implementation without having to think about the utilization. Since since the category did not specify C++ or JAVA, however, that ends that discussion.
Write a program to print odd numbers In vbnet between 51 to 100?
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
for(i=51;i<100;i=i+2)
{
printf("%d", i);
}
getch();
}
How do you check whether a given number n is a Fibonacci number or not?
In a Fibonacci sequence, sum of two successive terms gives the third term....
here is the Fibonacci sequence:
0,1,1,2,3,5,8,13,21,34,55,89,144........
General formula to generate a Fibonacci sequence is """Fn= Fn-1 + Fn-2"""
To check whether a number is Fibonacci or not follow the following steps:
1) Get the number as input from user.
2) Fix the first two numbers of sequence as 0 and 1.
3) put a sentinel loop with upper limit being the input number.
4)in the body of loop generate the next number in sequence in each iteration and continue swapping the values as follows:
a=0
b=1
next=a+b
while (next< input)
a=b
b=next
next=a+b wend
5) lastly when program exits the loop compare the last number of sequence with the input number
if they are equal then number is Fibonacci otherwise not.
otherwise the last term of sequence will be less than the input number.
A literal table in a compiler is a data structure that stores all the literal constants used in a program, such as numbers, strings, and characters. This table helps optimize memory usage by ensuring that identical literals are stored only once, reducing redundancy. During the compilation process, the compiler references the literal table to generate the appropriate code, facilitating efficient management of literals throughout the program's execution.
Nested loop, you mean; one loop in the other loop, eg:
for (i=0; i<10; ++i) {
for (j=0; j<i; ++j) {
printf ("i=%d, j=%d\n", i, j);
}
}
Can you give the explanation for various operations in a queue implementation using arrays?
The following are operations performed by queue in data structures
Edward C. Peach, who published under the pen name, "Ophiel," wrote eight books during the 1960 - 70's on occult topics: astral projection, creative visualization, caballa magic, clairvoyance, contacting the demiurge, general occult, talismanic magic, and a system of divination he called the Oracle of Fortuna. Also, Ophiel wrote a series of private lessons and short vignettes which he sold separately.
What is decision rule for ARR?
If the calculated ARR is greater that the predetermined ARR then accept the project. otherwise reject the project
What is the function used to delete end of file?
I think it is 'clearerr' what you tried to refer to.