#!/usr/bin/perl
print factorial($ARGV[11]);
sub factorial {
my($num) = @_;
if($num == 1) {
return 1; # stop at 1, factorial doesn't multiply times zero
} else {
return $num * factorial($num - 1); # call factorial function recursively
}
}
Describe the three basic tasks that are typically performed by every computer application program?
This answer depends on what the level of the application is running at.
Typically all applications do Instruction Processing, Disk Access, and Memory Access. At a higher level you could say that most end user applications do Initialization, Graphical Display, And User Input.
What is the name given to the type of program which turns a high level language into binary?
It's called compiler.
What is the difference between the or logical operator and the Xor operator?
The or operator will evaluate to true if either side of the operation is true.
The xor operator will evaluate to true only if exactly one side of the operation is true.
This means that these two operators will evaluate equally for all cases except when both sides of the operations are true.
true or true -> true
true xor true -> false
What provides scripts with the capability to store and later reference data used by the script?
jscripts
Difference between char pointer and char buffer?
The difference here is that char *p = "Hello";
will place Hello world in the read-only parts of the memory and making p a pointer to that, making any writing operation on this memory illegal. While doing: char p[] = "Hello";
puts the literal string in read-only memory and copies the string to newly allocated memory on the stack.
p[0] = 'A'; is legal.
Write a program to determine the weighted arithmetic mean using C language?
#include
void mean(int[],int);
void main()
{
int n,a[24];
printf("Enter the number of terms to find mean\n");
scanf("%d",&n);
printf("Enter the numbers\n");
for(i=0;i
scanf("%d",&a[i]);
mean(a,n);
}
void mean(int a[24],int n)
{
int sum=0,mean;
for(i=0;i
sum+=a[i];
mean=sum/n;
printf("The mean of given values is %d",mean);
}
What is array processor and what is the role of attached array processor?
aray processor is a processor that performs computations on large arrays of data.
It is of two types:
(1) attached array processor.
(2)SIMD array processor.
Windows Net Language (WNL)
Tcp ipv6 urgent help please asap?
i was messing with my router settings because my xbox live wouldn't connect.
on my ipv6 menu there was like 6 choices.
---automatically obtain ip address
---use the following ipv6 address
-subnet prefix length
-default gateway
-obtain dns server automtaically
-use the following dns server addresses
-preferred dns server
-alternate dns server
before i messed with it, it had manual settings and it had ip's.
but i changed the choice to automatically obtain ipv6 address and the dns server.
so it got rid of those numbers that were originally there.
and i don't remember those numbers.
how do i get the original numbers back?
because im trying to hook up to xbox live and now it wont connect at all.
so i have a feeling its because i messed with the ipv6 settings.
so what do i do???????
What should you learn before computer networking math programming etc?
A properly designed and run training course should take people with no knowledge of the subject through a graduated series of steps to full knowledge of the subject
If your 25 what year were you born in?
As of today's date, December 19, 2009, if you are 25 years old, you were born in 1984 if you birthday is on or before today's date. Otherwise, you were born in 1983 (you will be 26 later in the year).
What god has a shrine of prophesy in the Delphi?
Because of the nature of the site at Delphi, the original temple was devoted to Gaea, and later to Themis and Pheobe, the goddesses who shared the office of prophetic deity. Later, the site became sacred to Poseidon (since Delphi is seismically active and he was God of Earthquakes). When Apollo was named God of Prophecy, the site was rededicated to him, and under his guidance, the most memorable prophecies were made.
What is a variable called that is used to indicate whether or not a certain action has taken place?
This variable is called a "switch".
What is a string in programming?
A string is a process within a computer program. However, the word "process" is normally used for the main program, so you might think of it as a sub-process. In any case, the idea is that with threads, you can split up your code to run different processes simultaneously. If the computer has several available processors, the strings may really be running simultaneously; if there are more strings than processors, the operating system (or perhaps in some cases the runtime environment?) will simulate this, by alternating the available processors among the strings, so that each one runs for a short time, say, a few milliseconds.
Is the computer program bonjour worth having?
The software is used for networking. I would recommend that you leave it on your system.
How do you change algorithm to program code?
Ah yes, the eternal question on structured design and top-down coding.
First, you need to understand the algorithm you intend to use. Write down English-like statements that describe the steps., etc., to arrive at a solution. If you can't describe what you want to do then chances are you don't understand the algorithm.
Then, translate the English-like statement/paragraph into something called pseudo-code. Pseudo-code is a mixture of the English-like statement you provided and close to the grammar of the computer language you are translating to.
Then, step by step, change the individual steps from your pseudo-code example into the exact grammar of the computer language you are using. Finally, take all of the variables you have declared along the way and define them.
Voila! You now have the corresponding computer program that represents the algorithm you described earlier.
The linked list that does not contain NULL pointers?
What is your question about it?
It is quite possible, for example if it is a circular list, having a 'sentinel' node.
typedef struct ListE {
struct ListE *next;
...
} ListE;
ListE listhdr;
listhdr.next = &listhdr; /* empty list */