Is PERL an interpreted or compiled programming language?
Perl is both compiled and interpreted language.
In the traditional sense, Perl is a pure interpreted language. The reference Perl program is a prototypical two-stage interpreter: when a Perl script is invoked via #!/bin/perl (or similar), the perl interpreter performs a language parsing on the source code, creating an internal (to the perl interpreter) representation of program, which is then translated into binary code for execution. Every invocation of a perl program requires this translation/interpretation to be completed.
There are several projects which can take perl source code and compile it down to a binary executable (that is, bypass the whole repeated translate/interpret phase each time). However, these are NOT complete - even the best can only manage about 95% of the perl code available. That is, these perl compiler are incomplete implementations of the Perl language. They can be very useful, but are not complete substitutes for the Perl interpreter.
The real answer is that Perl was designed to be an interpreted language from the start; attempts to turn Perl into a compiled language are faced with the difficulty of Perl's sprawling syntax and complete lack of design for compilation, and thus, struggle to implement all the languages features in a compiler.
Is the size of an integer compiler dependent or machine dependent?
The size of an integer is compiler-dependant. The compiler itself is machine-dependant so it could be argued they are in fact machine-dependent, however we don't write code to suit the machine, we write code to suit the compiler, even when the code is machine-dependent.
Definition of In-house software development?
When a company needs a piece of software written they sometimes choose to use programmers within their own company to write it. This is known as "in-house" development.
false
How can you create java average calculator..any integer number.using netbeans or notepad plus plus?
import java.util.*;
public class avg {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("How many numbers: ");
int amount = input.nextInt();
double [] numbers = new double[amount];
double count = 0;
double avg;
for(int i = 0; i < numbers.length; i++){
System.out.print("Number: ");
numbers[i] = input.nextDouble();
count += numbers[i];
}
avg = count / amount;
System.out.println(avg);
}
}
What are the reasons that supercomputers mainframes not recommended for home?
There are two fairly simple answers to that question:
# Supercomputers are expensive! (tens of thousands to millions of dollars) # The architecture for supercomputers is typically proprietary. Any software you run on it would have to be at least recompiled, if not rewritten completely from source on the computer. This means no normal games or photo/video editing software would run (those being the major reasons a "home" user would want a powerful computer for).
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
int stack[10],n=0;
int fact(int);
int pop();
void push(int);
main()
{
int num;
printf("\n FACTORIAL USING STACK IMPLEMENTATED WITH ARRAY\n");
printf("\n Enter a number whose factorial is to be found(1-9): ");
scanf("%d",&num);
printf("\n The factorial is : %d",fact(num));
getch();
} void display()
{
int i;
printf("\n The stack is :\n");
for(i=1;i<=n;i++)
{
printf("%d\t",stack[i]);
}
}
int pop()
{ if(n==0)
{
printf("\n Stack empty!Pop not possible!");
exit(1);
}
else
{
int res=stack[n];
--n;
display();
return res;
}
} void push(int x)
{
if(n==9)
{
printf("\n Stack full!Push not possible");
exit(1);
}
else
{
n++;
stack[n]=x;
display();
}
}
int fact(int num)
{
if(num==2)
{
push(2);
push(1);
int res=1;
display();
while(n>=1)
res*=pop();
return res;
} else
{
push(num);
return fact(num-1);
}
}
There use Satellite images.
Bing Maps for Enterprise (previously Microsoft Virtual Earth) is a geospatial mapping platform produced by Microsoft. It allows developers to create applications that layer location-relevant data on top of the Bing Maps map imagery. This includes imagery taken from satellite sensors, aerial cameras (including "Bird's Eye" aerial imagery taken at 45 degree angle view to show building façades and entrances) as well as 3D city models and terrain.
reference -
http://en.wikipedia.org/wiki/Bing_Maps_for_Enterprise
A recursive algorithm is an algorithm which calls itself with "smaller (or simpler)" input values, and which obtains the result for the current input by applying simple operations to the returned value for the smaller (or simpler) input.
Heres a recursive algorithm to reverse a string
char *rev(char str[],int pos1,int pos2)
{
if(pos1<pos2)
{
char temp=str[pos1];
str[pos1]=str[pos2];
str[pos2]=temp;
return rev(str,pos1+1,pos2-1);
}
return str;
}
You can call this function like this
char *r=rev("reverse it",0,9);
Why should you use private attribute and example?
The "private" attribute causes the method, object, or class to which it is applied to become inaccessible to code outside of its "private" scope. This means that a compiler will issue an error if any code outside of the "private" scope attempts to access the method, object, or class that is marked as private. You should use this when you wish to ensure that your data's integrity is maintained when other code could use it.
Some common industry examples: singleton objects (only one may exist at any time), a class that manages its internal state would use only accessor and mutator functions to allow outside code access (known as encapsulation, a foundation of object-oriented programming; often called a class' API), and business logic protection (by restricting certain functions to only a formal instance of a class, and not its subclasses).
Can you play PC games on a PS3?
Playing games is always fun and if we can play PS3 games on PC then it gives a fantastic gaming experience. You might have wondered about how to run PS3 games on PC but playing PS3 games on PC needs an emulator and with the help of RPCS3 emulator which is a Windows and Linux application you can use to allows you to save the emulator to your hard drive. The Windows is available as a ZIP archive and by extracting the file we can use it as RPCS3 doesn’t need installation.
How to Reverse a hexadecimal number using bitwise?
main()
{
int num=0xABCD;
printf("%x\n",num);
int rev=0x0;
int digit=0x0;
while(num!=0x0)
{
digit=num%0x10;
rev = rev*0x10 +digit;
num=num/0x10;
}
printf("%x\n",rev);
}
#include <stdio.h>
#define FALSE 0
#define NULL 0
typedef struct {
int dataitem;
struct listelement *link;
} listelement;
void Menu (int *choice);
listelement * AddItem (listelement * listpointer, int data);
listelement * RemoveItem (listelement * listpointer);
void PrintQueue (listelement * listpointer);
void ClearQueue (listelement * listpointer);
main () {
listelement listmember, *listpointer;
int data,
choice;
listpointer = NULL;
do {
Menu (&choice);
switch (choice) {
case 1:
printf ("Enter data item value to add ");
scanf ("%d", &data);
listpointer = AddItem (listpointer, data);
break;
case 2:
if (listpointer NULL)
printf ("queue is empty!\n");
else
while (listpointer != NULL) {
printf ("%d\t", listpointer -> dataitem);
listpointer = listpointer -> link;
}
printf ("\n");
}
void ClearQueue (listelement * listpointer) {
while (listpointer != NULL) {
listpointer = RemoveItem (listpointer);
}
}
What is difference between A buffer algorithm Z buffer algorithm?
A z-buffer is a raster buffer that stores color and depth information at each pixel. The "z" in the title refers to the "z" plane in 3D space, which is traditionally thought of as the "depth" dimension.
The buffer initializes each pixel to the default color and an infinite depth. During the rendering process, when a color is written to a pixel, it first compares the current depth of the color in the pixel. If the new color is closer than the current color but closer than the clip plane (which is typically zero), the color is written and the depth updated.
In that sense, it's similar to the painter's algorithm, where the closer object covers the further object.
Here's the basic algorithm:
WritePixel(int x, int y, float z, color c)
if ( z < zbuffer[x][y] && z > 0 ) then
zbuffer[x][y] = z;
frameBuffer[x][y] = color;
end
The a-buffer uses the same algorithm for handling depth, but adds anti-aliasing. Each pixel contains a set of sub-pixels. During the write operation, the values are accumulated at the sub-pixel level. For the final pixel read, the final color is the sum of all the sub-pixels.
The algorithm was originally developed by Loren Carpenter (or Pixar) for the RenderMan renderer. The position of the sub-pixels in each pixel are randomly selected in space and time, which allows smooth blurring of moving objects. RenderMan dices geometry down to micropolygons (polygons approximately the size of a pixel), and then performs a coverage test to determine if a sub-pixel is covered by a micro-polygon.
However, this approach doesn't work with a more "typical" renderer, since they typically deal with points, which unlike micropolygons, have no surface area.
A common adaption of this algorithm is the accumulationtechnique, which renders an image multiple times, randomly jittering (moving) the position of the eyepoint by some small amount. The result of each rendering is accumulated and averaged into single buffer. This approach is made practical with a hardware accelerated renderer such as OpenGL. However, this approach is probably better thought of as supersampling rather than an a-buffer.
What are the different possible approaches to system error correction in compilers?
Compilers do not correct errors let alone system errors. A system error is a systematic failure, either within the hardware itself or in its software configuration. A compiler is specifically concerned with program source code and whether or not it is capable of being compiled into object code. If not, the compiler will tell you where the problem lies, but you still have to fix it yourself. It will not detect system errors of any kind.
What is a removable disk on a computer?
Because the term 'disc' or 'disc' refers to several different memory formats, 'removable disk' designates those which can be removed and replaced without opening the computer's case. There are a number of different types of removable discs, such as; A floppy disc. Originally an 8 inch disc, this format has shrunk to 3 1/2 inches. Many new computers do not have floppy disc drives, because the format can only hold 1.4 megabytes per disc. There have been several 3 1/2 inch optical disc drives created, which are similar to CD-R/W drives, in that the disc is written to and read by a laser. These drives can be mounted in place of a floppy drive, and have capacities of 20 megabytes, or more. CD-ROM -R/W The compact disc, a 5 inch optical Read Only Memory format, is generally thought of as an audio format, but was adapted for use by computers shortly after its introduction. Many computers can now boot from a CD, and most software is sold on CD. The Read/Write CD drive is now over ten years old, and was introduced as a way to store and transfer data. Drives that can write to a CD are called 'burners', but can only write to special CD's, called CD-R/W or Read/Write. DVD-ROM - R/W. With the introduction of the Digital Video Disc, the amount of data that could be stored on a 5 inch optical disk increased dramatically. The DVD format has gone through the same evolution as the CD format, in that a burner type drive was introduced some years after the ROM drive. However, DVD discs will not work in CD drives, although most DVD drives can read CD's. Generally, a computer will refer to CD and DVD drives under the general heading of CD-ROM drives. The most common use of 'removable disc' is the 3 1/2 inch floppy.
You're probably mixing up terms here as QWERTY is the name given to a standard English keyboard; there is no such thing as a "QWERTY word". If you simply want to test if a given word is composed of letters, digits or other symbols within a given subset of characters, then use the String.IndexOfAny() method to compare each character in turn against a fixed array of accepted characters.
What memory on a computer can be easily lost?
Memory that requires power to maintain it is "volatile memory" and includes RAM. RAM is random access memory, and, to keep it simple, the data put in RAM by the microprocessor is lost when power to the RAM is interrupted. That's like when the machine is shut down or loses power. Data stored in RAM "disappears" if the memory is not "kept alive" by the power supply. RAM is not designed to "hold" data when the machine powers off. Computers don't rely on RAM to "remember" what is in it at shut down. When the machine boots up next work cycle, RAM is reloaded with what the microprocessor wants in it to support operations.
How do you disable Windows XP login prompt?
# Press Win_Key+R to open Run dialog box # Type "control userpasswords2" (without quotes) # User Accounts dialog box get open. Now in Users tab, uncheck "Users must enter a username and password......". # Press OK # Give the username and password to want to logon automatically. # To check try logging off and re-login .
Thanks,
Kiran
Is colour-critical graph always connected?
Yes. If it was disconnected, you could remove an edge from the component with the lower chromatic number. This wouldn't affect the chromatic number of the first component.
What is first object oriented programming language?
Simula 67 (1967) was the first programming language designed that had the notion of objects, classes, inheritance, etc. in it.
Smalltalk (1970s), influenced by Simula 67, was the first programming language designed with the actual idea of "object-oriented programming" in mind.
JUnit is a unit testing framework for the Java programming language. Created by Kent Beck and Erich Gamma, JUnit is one of, and arguably the most successful of, the xUnit family of frameworks that originated with Kent Beck's SUnit. JUnit has spawned its own ecosystem of JUnit extensions. Experience gained with JUnit has been important in the development of test-driven development, and as a result, some knowledge of JUnit is often presumed in discussions of test-driven development, for example in the book Test-Driven Development: By Example, ISBN 0-321-14653-0 by Kent Beck. JUnit has been ported to other languages, including C# (NUnit), Python (PyUnit), Fortran (fUnit), and [[C++]] (CPPUnit). This family of unit testing frameworks is referred to collectively as xUnit. TestNG has many of the same goals as JUnit. And more recently, owing to the development of rich client frameworks such as AJAX, a port of JUnit has been developed for JavaScript (JSUnit) http://www.jsunit.net/. "Hello world" example in JUnit 3.8 and earlier: public class HelloWorld extends TestCase { public void testMultiplication() { // Testing if 2*2=4: assertEquals ("Multiplication", 4, 2*2); } } (compare with the similar example for Mauve.) The method testMultiplication will be discovered automatically by reflection. "Hello world" example in JUnit 4.0: public class HelloWorld { @Test public void testMultiplication() { // Testing if 2*2=4: assertEquals ("Multiplication", 4, 2*2); } } JUnit is a unit tester for Java. Its used for running tests while programming in Java
All programming languages need to be converted to machine code. Machine code is the native language of the machine; it is the only language understood by the machine. When we write programs in other languages they must be translated into machine code. To achieve that, we need to write a program to perform the translation for us.
For this we can either use an assembler, a compiler or an interpreter, all of which are machine code programs. Assemblers can only be used with assembly languages, which are low-level symbolic languages that translate near 1:1 with the machine code. The machine code can be saved and executed without further translation. However, assembly languages are not portable; each machine architecture has its own specific version of machine code and therefore requires its own specific assemblers to produce it. To port the code to another architecture you essentially have to re-write the entire source code. There are tools (pre-processors) that can help make the task easier but it's by no means a straightforward process.
[The reverse of assembling is disassembling, which converts machine code into a low-level language that is similar to assembly but is known as disassembly. However, since an assembler strips out all variable names and user comments, a disassembler cannot restore the original assembly language code. Indeed it is impossible to restore the original source code no matter what language was used. Disassembly is as good as it gets.]
All high-level languages are either compiled or interpreted or are both compiled and interpreted.
Compiled languages compile the entire source code into machine code, much like assembly language but with a higher level of abstraction between the source and the machine code. As with assembly languages, the machine code can be saved and executed without any further translation. Being more abstract, compiled languages are much easier to port to other architectures than assembly languages. However they must still be compiled separately upon each architecture. The most popular examples of compiled languages are C and C++.
Interpreted languages do not translate the entire source code, they step through the source code one statement at a time, converting each statement to machine code and executing it before moving onto the next statement. This has the advantage over compiled languages in that you do not have to wait for the entire program to compile before executing the program. A compiled language program can take several minutes to compile, whereas an interpreted language can be executed immediately. However, the need to interpret every statement before executing it incurs a performance penalty. With compiled languages, you only pay the cost during compilation; once compiled, you do not need the compiler. Interpreted languages cannot execute without the interpreter, but any machine that has a suitable interpreter can execute the same source code regardless of which machine architecture it was written on. The most popular interpreted language is BASIC since it is the language most programmers learn before moving onto other languages.
Languages that are both compiled and interpreted use a compiler to produce an intermediate source known as byte code. Byte code is not machine code, it still has to be interpreted, however the byte code "statements" are much simpler to interpret than an interpreted language's statements thus it performs much better. Also, unlike compiled languages, the compiled byte code is highly portable. The best example of such a language is Java which compiles to Java byte code suitable for interpretation by the Java virtual machine (JVM). Given that virtually all platforms provide a JVM implementation, it's no surprise that Java is by far the most popular application programming language in use today. However, it's lack of low-level features limits its usefulness in non-application fields such as driver software, operating system kernels and embedded systems software. Its performance and memory consumption also leaves a lot to be desired, however it's ease-of-use makes it a good stepping stone to learning C++.