Portability is a characteristic attributed to a computer program if it can be used in an operating systems other than the one in which it was created without requiring major rework. Porting is the task of doing any work necessary to make the computer program run in the new environment. In general, programs that adhere to standard program interfaces such as the X/Open Unix 95 standard C language interface are portable. Ideally, such a program needs only to be compiled for the operating system to which it is being ported. However, programmers using standard interfaces also sometimes use operating system extensions or special capabilities that may not be present in the new operating system. Uses of such extensions have to be removed or replaced with comparable functions in the new operating system. In addition to language differences, porting may also require data conversion and adaptation to new system procedures for running an application. Portability has usually meant some work when moving an application program to another operating system. Recently, the Java programming language and runtime environment has made it possible to have programs that run on any operating system that supports the Java standard (from Sun Microsystems) without any porting work. Java applets in the form of precompiled bytecode can be sent from a server program in one operating system to a client program (your Web browser) in another operating system without change.
Can a pointer to char data-type be type casted to pointer to integer type?
Yes it is possible in C language.
int main(void) { char *cptr; int *iptr; iptr=(int*)cptr; return 0; }
If you find the info useful Please Vote!!!
What is the difference between 16 bit compilers and 32 bit compilers in C?
16 bit compilers compile the program into 16-bit machine code that will run on a computer with a 16-bit processor. 16-bit machine code will run on a 32-bit processor, but 32-bit machine code will not run on a 16-bit processor. 32-bit machine code is usually faster than 16-bit machine code.
-DJ Craig
NoteWith 16 bit compiler the type-sizes (in bits) are the following:short, int: 16
long: 32
long long: (no such type)
pointer: 16/32 (but even 32 means only 1MB address-space on 8086)
With 32 bit compiler the object-sizes (in bits) are the following:
short: 16
int, long: 32
long long: 64
pointer: 32
With 64 bit compiler the object-sizes (in bits) are the following:
short: 16
int: 32
long: 32 or 64 (!)
long long: 64
pointer: 64
[While the above values are generally correct, they may vary for specific Operating Systems. Please check your compiler's documentation for the default sizes of standard types]
Note: C language itself doesn't say anything about "16 bit compilers" and "32 bit compilers"
Can you explain in which scenario the primitive types are used as objects?
It is sometimes easier to deal with primitives as objects. Moreover most of the collection classes store objects and not primitive data types. And also the wrapper classes provide many utility methods also. Because of these resons we need wrapper classes. And since we create instances of these classes we can store them in any of the collection classes and pass them around as a collection. Also we can pass them around as method parameters where a method expects an object
It is sometimes easier to deal with primitives as objects. Moreover most of the collection classes store objects and not primitive data types. And also the wrapper classes provide many utility methods also. Because of these resons we need wrapper classes. And since we create instances of these classes we can store them in any of the collection classes and pass them around as a collection. Also we can pass them around as method parameters where a method expects an objectWhat do you mean when you say that Java has two concepts?
You are talking about the implementation point view of Abstract class and the interface. Let's go. 1. Interface helps Multiple inheritance:- In java you can't have a class inherited from more than one class, i.e. the multiple inheritance. Interface helps us in implementing the multiple inheritance(virtually), because their is no such restriction in implementing more than one interface. But the Abstract class can't help you doing so. 2. Interface helps global declaration:- In C/C++, a header file holds the declaration of the functions and the symbolic constants. Similarly we can have a interface which is having only the symbolic constants which is same for all classes which implements it. And also the method have only the signature and the class which implements it is free to write the body at his own wish. Abstract class can't help in doing this. 3. Abstract class is more secure:- Because in Interface we have all the things public. But in Abstract class we can have private and also friendly members. 4. Interface is overhead:- Because in Interface we are bound to implement all the methods though some of them we actually need. But in case of the Abstract class we can override the methods which we want.
Which type of appeal does this statement use?
Lee has 15 years of experience in promoting the rights of small businesses.
What is the disadvantage of a screw with larger thread spacing?
The larger thread spacing has 2 disadvantages: It is not a strong since it has less effective area; and if you are using to precisely locate something there is less precison per turn.
public static final void readIntList() {
// set up our input buffer
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String currentLine;
// I'll use a linked list for this;
// replace it with whatever best suits your purpose
List<Integer> intList = new LinkedList<Integer>();
// loop until we read -999
while (!(currentLine = in.readLine()).equals("-999")) {
try {
// convert from string to int
int currentNumber = Integer.parseInt(currentLine);
// add to the list
intList.add(currentNumber);
} catch (final NumberFormatException ex) {
// we go here if the user didn't type in an integer
}
}
// display our lovely list
System.out.println(intList);
}
Write a for next loop for even numbers beginning at 10 and ending at 50?
int i;
for (i=10; i<=50; i+=2) loop statement;
Java program to print Phythagorean triplets?
A Pythagorean triplet is the set of three integers such that:
a < b < c and a2 + b2 = c2
private static final void printPythag(final int max) {
for (int a = 1; a < max; ++a) {
for (int b = a + 1; b < max; ++b) {
final double possibleValueOfC = Math.sqrt(a * a + b * b);
// (ugly) Check to see if the result was an integer.
// If so, we have a Pythagorean triple on our hands.
if (possibleValueOfC == (double) ((int) possibleValueOfC)) {
System.out.println("(" + a + "," + b + "," + (int) possibleValueOfC + ")");
}
}
}
}
What are some fresh ideas for incorporating the keyword "innovation" into our project?
Some fresh ideas for incorporating the keyword "innovation" into our project could include brainstorming new and creative solutions, experimenting with cutting-edge technologies, collaborating with experts in different fields, and encouraging a culture of continuous improvement and learning.
What does the keyword "ba" signify in the context of love?
In the context of love, the keyword "ba" is often used as a term of endearment or affectionate nickname for a romantic partner.
What is the definition of the keyword "pinoc"?
The keyword "pinoc" does not have a widely recognized definition in the English language.
What is the plain sense of things analysis of the keyword "justice"?
The plain sense of things analysis of the keyword "justice" refers to a straightforward interpretation or understanding of the concept of justice. It involves looking at justice in a practical and common-sense way, focusing on fairness, equality, and the application of laws and rules to ensure that people are treated justly and fairly.
In object-oriented programming, a parent class is a class that is extended by another class, known as a child class. A grandparent class, on the other hand, is a class that is higher up in the inheritance hierarchy and is not directly extended by the child class. The key difference is that a parent class is directly related to the child class, while a grandparent class is further up the inheritance chain.
What is a heap in Java and how does it function within the Java programming language?
In Java, a heap is a data structure used to store and manage objects dynamically allocated during program execution. It is a region of memory where objects are stored and accessed by the Java Virtual Machine (JVM). The heap is responsible for memory allocation and deallocation, allowing objects to be created and destroyed as needed. This helps manage memory efficiently and ensures that the program runs smoothly without running out of memory.
What is another name for the keyword "function" in programming?
In programming, another name for the keyword "function" is "method."
The lexicographically smallest palindrome that can be formed using the letters in the keyword "keyword" is "deed."
What is the method to find the height of a binary search tree in Java?
To find the height of a binary search tree in Java, you can use a recursive method that calculates the height of the left and right subtrees and returns the maximum height. This can be implemented by defining a method that takes the root node of the tree as input and recursively calculates the height of the tree.
What is the order of bits in the given keyword?
The order of bits in the given keyword refers to the sequence in which the individual bits are arranged within the keyword.
What is the process for managing the state of objects in Java?
In Java, the process for managing the state of objects involves using instance variables to store the object's data and methods to manipulate that data. This allows for the object's state to be modified and accessed as needed throughout the program. Additionally, encapsulation is used to control access to the object's state, ensuring that it is only modified in a controlled manner.
What is the regular expression for a context-free grammar that generates the keyword "keyword"?
The regular expression for a context-free grammar that generates the keyword "keyword" is simply the word "keyword" itself.
The "state" keyword in Java is significant because it allows programmers to define the properties or attributes of an object. These properties represent the current condition or data of the object. By using the "state" keyword, programmers can set and access these properties, which are essential for determining the behavior and functionality of the object in a program.
What is the significance of the keyword "every b" in the context of the current situation?
The keyword "every b" is significant in the current situation because it indicates that all individuals or entities are included or affected. It suggests a universal or comprehensive scope, emphasizing the importance of considering every single aspect or element in the context being discussed.
What is the significance of the keyword "not a and b" in the context of the problem at hand?
The keyword "not a and b" is important because it indicates a condition where both statements a and b are false. This helps in narrowing down possibilities and making accurate decisions in the problem being addressed.