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.
Specifying exactly what is to be measured in assigning a value to a variable is called what?
operationalization
Automated proofs are a complicated subject. If you are not an expert on the subject, all you can hope for is to write a program where you can input a sample matrix (or that randomly generates one), and verifies the proposition for this particular case. If the proposition is confirmed in several cases, this makes the proposition plausible, but is by no means a formal proof.
Better try to prove it without writing any program.
Note: it is not even true; it is the inverse of the matrix which gives identity when is multiplied with the original matrix.
Write a c program to check whether a string follows English capitalization rules?
Active Time spent online
The UNION keyword is commonly used, as part of a SELECT statement in the SQL language, to combine two tables, which must have identical or at least compatible structures, vertically. That is, records from BOTH tables are placed into a single result table. If, for example, each table has 1000 records, the resulting table would have 2000 records - assuming there are no duplicates.