Why is cyclic inheritance not in any programming language?
Cyclic inheritance is physically impossible. A base class cannot inherit from one of its own derivatives any more than you could inherit some generic trait from one of your own descendants. Inheritance is strictly a one-way street.
How do you find the smallest value in a set of numbers in qbasic?
Store the numbers in a suitable container such as an array. Assume the first number is the smallest and assign its value to a local variable. Traverse the remainder of the sequence, comparing each element's value to the stored value. If an element has a lower value, assign its value to the local variable. When the sequence is fully traversed, the local variable will hold the value of the smallest value in the sequence. Return that value.
Can Array-based lists can never be empty?
It's either an array or it's a list, it cannot be both. However, an empty array is entirely possible:
std::vector<int> my_vector; // an empty array
my_vector.push_back(42); // an array of 1 element
my_vector.push_back(1); // an array of 2 elements
my_vector.clear(); // an empty array
An empty list is also possible:
std::list<int> my_list; // an empty list
my_list.push_back(42); // a list of 1 element
my_list.push_back(1); // a list of 2 elements
my_list.clear(); // an empty list
The same thing can be done in C:
int* my_array = nullptr; // an empty array
my_array = malloc (2*sizeof(int)); // an array of 2 elements
my_array[0] = 42;
my_array[1] = 1;
free my_array; // an empty array
my_array = 0;
Can structures be passed to the functions by value?
Structures can be passed to the functions by value. But it has to be copied to another location. Hence wastage of memory
When an array name is passed to function in c?
It 's address is received by the function .
that any changes in the value of array elements in the function will result in actual change.
Governance at the macro level covers all aspects of exercising authority through formal and informal institutions in managing a state's resources for sustainable development. Thus, the elements of macro governance include the creation a favourable climate for economic growth, transparent budgetary and financial management, transparency in the political process, and a voice for all citizens, while providing them with effective social and environmental services.
Source: Arab guy at UNSW
It has several meanings, none of which have anything to do with computer programming. In mathematics, a Quadrature is a numerical integration.
Is it necessary to read or display the elements of an array in order of its subscripts?
By no means; you can access any random array element. If you have ever seen examples which process them in order, it is because of the following: when the order doesn't matter (for example, you want to calculate the sum of all the array elements), it is easiest to process them in order.
What is accuracy of a good program?
It depends on to what level of accuracy you tend to have with the output of your program
Accuracy can be treated as: (Desired Output / Actual Output of your Program)
A place where you store your documents. However, this may have special meaning within certain contexts/applications.
What is a side-by-side configuration?
A side-by-side configuration is simply an arrangement where two things are adjacent to each other. It could be said that houses are built on lots in a side-by-side configuration. Driving down the street, you see house after house after house. The main guns on a battleship are arranged in a turret in a side-by-side configuration.
What is the maximum speed at which data can be transmitted between two nodes?
The speed of light is the limit for the transmission of information. As for the bandwidth (the number of bits per second that are transmitted), fiber optics currently exist that allow 40 Gbps; experimentally, higher bandwidths have already achieved, but this is not standardized. It is also possible to connect several of those in parallel, to achieve even higher bandwidths.
When advantages do a procedural language have over a declarative language?
Is it the most efficient approach to access elements with the vector data structure?
Yes. A vector is a variable-length array but constant-time random-access is guaranteed regardless of an array's length.
Can a method be declared in any order in a class?
Yes. There is no specific order in which the compiler expects methods to be present. As long as the method is inside the class it is perfectly fine.
What is the difference between enumrerated datatype and typedef?
Its very Simple that using Enumerated data type you are making special integers that flow within range, While a typedef is redefining data type with new name. Example: like defining enum Days{sun,mon,tue.....} makes an integer definition that can have 0-7 values So if u do following: Days x=sun; or Days x=0; then x=x+2; is 2 or tue and x=x+7; is 0 or sun again... Means its modulo 7 data type ................. While doing this: typedef Days WeekDays; renames Days as WeekDays Similary typedef int NUMBER; renames int as NUMBER .But wait it is one more name for the data type.. So simply enum creates a numeral modular datatype with a range while typedef creates another name for it. Rupesh K Joshi
Given an int array length 2 return true if it contains a 2 or a 3.?
public boolean has2or3(int[] nums) {
if ( nums[0] 3 )
return true;
return false;
}
How do you create an object for anonymous class?
public class Class1 {
protected InnerClass1 ic;
public Class1() {
ic = new InnerClass1();
}
public void displayStrings() {
System.out.println(ic.getString() + ".");
System.out.println(ic.getAnotherString() + ".");
}
static public void main(String[] args) {
Class1 c1 = new Class1();
c1.displayStrings();
}
protected class InnerClass1 {
public String getString() {
return "InnerClass1: getString invoked";
}
public String getAnotherString() {
return "InnerClass1: getAnotherString invoked";
}
}
}
we can do like . crieate inner class instanve in side of main class defalut consiter . use the object we do the our bz logic
What is the boolean search connector OR used for?
"Or" retrieves all of the records that contain "either" the first term "or" the second "or" both. It's a way of broadening your search and is typically used with synonyms.