Yes. A black box is a system whose contents are unknown, but can produce a predictable output based on a given input. Software libraries may be considered black boxes, for example, if the source code for the library is unavailable. Black boxes may be software (as the previous example), or hardware, such as an hardware-based encryption chip.
Where do you run an algorithm?
By preparing test cases we can test an algorithm. The algorithm is tested with each test case.
What is the difference between RMI and RPC?
RMI simply offers remote access to an object running in another process. But EJB offers far more services than RMI. EJB leverages this remote-object feature of RMI, but also provides other services such as persistence, transaction management, security, and resource management. The EJB server provides all of these complex services which allows EJB developers to worry about business logic instead. For a complete understanding of EJB i suggest Http://edocs.bea.com/wle/rmi/sampejb.htm
Who developed C programming language?
C language was developed by an American computer programmer Dennis Rithie and kerningham
From jp dhillon moga
c language was developed by an American computer programmer Dennis ritche & kerningham bell laborteries united state of America in 1972....
void main()
{
int a[10][10],b[10][10],c[10][10],i,j,k,m,n,p,q;
printf("Enter The Rows And Cloumns And Of The First Matrix:");
scanf("%d %d",&m,&n);
printf("\nEnter The Rows And Cloumns And Of The Second Matrix:");
scanf("%d %d",&p,&q);
printf("\nEnter Elements Of The First Matrix:\n");
for(i=0;i< m;i++)
{
for(j=0;j< n;j++)
{
scanf("%d",&a[i][j]);
}
}
printf("\nEnter Elements Of The Second Matrix:\n");
for(i=0;i< p;i++) {
for(j=0;j< q;j++)
scanf("%d",&b[i][j]);
}
printf("The First Matrix Is:\n"); /* Print the first matrix */
for(i=0;i< m;i++) {
for(j=0;j< n;j++)
printf(" %d ",a[i][j]);
printf("\n");
}
printf("The Second Matrix Is:\n"); /* Print the second matrix */
for(i=0;i< p;i++) {
for(j=0;j< q;j++)
printf(" %d ",b[i][j]);
printf("\n");
}
if(n!=p) {
printf("Aborting./nMultiplication Of The Above Matrices Not Possible.");
exit(0);
}
else {
for(i=0;i< m;i++) {
for(j=0;j< q;j++) {
c[i][j] = 0;
for(k=0;k< n;k++) {
c[i][j] = c[i][j] + a[i][k] * b[k][j];
}
}
}
printf("\nThe Product Of The Two Matrices Is:\n\n");
for(i=0;i< m;i++) {
for(j=0;j< q;j++) {
printf(" %d ",c[i][j]);
}
printf("\n");
}
}
return 0;
}
-----------------------------------------------------">-----------------------------------------------------The above code is not the solution of Matrix multiplication using pointers.
the following code is absolutely correct.
void main()
{int *a,*b,*c,row1,col1,row2,col2;
clrscr();
printf("enter rows of 1at matrix");
scanf("%d",&row1);
printf("enter columns of 1at matrix");
scanf("%d",&col1);
printf("enter rows of 2nd matrix");
scanf("%d",&row2);
printf("enter columns of 2nd matrix");
scanf("%d",&col2);
if(col1!=row2)
{
printf("\nsorry\n");
}
else
{
a = (int *) malloc(row1*col1 * 2);
b = (int *) malloc(row2*col2 * 2);
c = (int *) malloc(col1*row2 * 2);
clrscr();
printf("enter 1st matrix \n");
insert(a,row1,col1);
getch();
clrscr();
printf("enter 2st matrix \n");
insert(b,row2,col2);
getch();
clrscr();
printf("1st matrix is\n");
display(a,row1,col1);
printf("\n2nd matrix is\n");
display(b,row2,col2);
prod(a,b,c,row1,col2);
printf("\nafter multiplication \n\n\n");
display(c,row1,col2);
}
getch();
}
insert(int *q,int r,int c)
{int i,j;
for(i=0;i { for(j=0;j { printf("\nEnter [%d][%d] element-- ",i,j); scanf("%d",(q+i*c+j)); } } } display(int *q,int r,int c) {int i,j; for(i=0;i { printf("\n"); for(j=0;j { printf("%d\t",*(q+i*c+j)); } } } prod(int *p,int *q,int *z,int r1,int c2) {int i,j,k; for(i=0;i { for(j=0;j { *(z+i*c2+j)=0; for(k=0;k { *(z+i*c2+j)+=*(p+k*2+j)*(*(q+i*c2+k)); } } } } //Designed by Asjad Farrukh.......
Write a Java program that computes the summation of 1 to n?
Increment your counter two at a time. Example, for n = 100:
n = 100;
sum = 0;
for (int i = 1; i <= n; i+=2) sum += i;
Another option (less efficient) is to loop through ALL integers, and check whether the number is odd:
n = 100;
sum = 0;
for (int i = 1; i <= n; i++) {
if (i % 2 == 1)
sum += i;
}
Or:
if (min%2==0) min= min+1;
if (max%2==0) max= max-1;
sum = ((max-min)/2 + 1) * (min+max) / 2;
Difference between ethical hacking and security testing?
According to the EC-Council's Certified Ethical Hacker course documentation the two can be defined as follows; Penetration Testing:
A goal-oriented project of which the goal is the trophy and includes gaining privileged access by pre-conditional means.Ethical Hacking:
A penetration test of which the goal is to discover trophies throughout the network within the predetermined project time limit. For me reading that I would say difference is; a pen-test has a single goal (trophy) and strict procedures that have to be followed to get that trophy, and an ethical hack is a much larger beast that involves many goals or trophies, could last so long it needs to be time restricted, and in general has less limits. So a pen-test is "one goal, one process" and ethical hacking is "hack everything that can be hacked... ...ethically"
How long will it take for you to get a masters degree in computer programming?
The PhD would take approximately four years post bachelor's to complete. The actual length of time depends much on how long it takes a student to prepare and defend their dissertation, which is an individual student project advancing an original view point on a topic of the students choosing with extensive supporting research and approved by a designated committee.
Can static variables be declared in header file?
Can static variables be declared in a header file?
You can't declare a static variable without defining it as well (this is because the storage class modifiers
static and extern are mutually exclusive). A static variable can be defined in a header file, but this would cause each source file that included the header
What is the purpose of creating a bulleted list within a document?
Bullet points are used to convey information quickly;
using bullet points next to paragraphs of information will not help your audience find information easily.
What is the history of foxpro?
foxpro is a very important in programming .. because there is a lot of knowledge that u found here and also it gives u cultivation on how u know the programming language
Why oops a bottom up approach?
An approach to design in which you start by designing the low-level details such as the utilities, and then decide how these will be put together to create successively higher-level components, and ultimately the entiresystem
What card translates binary data into images on a computer screen?
If there is a dedicated card, it's commonly called a graphics card. Some computers have a graphics chip set on the motherboard, this is called integrated graphics. These are usually inferior to a dedicated card, but much cheaper.
The result of assembling an assembly language source is an executable. The name of that executable is dependent upon the output file name passed to the assembler. The program that performs the assembly is the assembler itself.
More specifically, the assembler produces one or more object files, which are fed into the linker or binder. The linker or binder then produces the executable, by combining the object files, along with referenced library files, and then resolving external references.
How do you create window with c?
It is not possible to create a window with C as the C language does not specify any standard libraries for doing graphical programming. It is possible to create a window with C and one of the many graphics libraries that have been written since C was created. For example, using the Gtk+ library: #include #include int main (int argc, char *argv[]) { GtkWidget *window; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_show_all (window); gtk_main (); }
Write a c plus plus program of array to pointers?
#include
void
printarr(int
a[]);
void
printdetail(int
a[]);
main()
{
int
a[5];
for
(int
i = 0;i<5;i++)
{
a[i]=i;
}
printdetail(a);
}
void
printarr(int
a[])
{
for
(int
i = 0;i<5;i++)
{
printf("value in array %d\n"
,a[i]);
}
}
void
printdetail(int
a[])
{
for
(int
i = 0;i<5;i++)
{
printf("value in array %d and address is %8u\n"
,a[i],&a[i]);
}
}
void
print_usingptr(int
a[])
{
int
*b;
What does Bluetooth stand for?
Bluetooth ka koi technical full from nai he kyuki Bluetooth ka nam ek raja ke nam per hai.Isiliye Bluetooth ka full from hai......ye ब्लूटूथ शब्द या फुल फॉर्म दसवीं शताब्दी में डेनमार्क और नोर्वे के राजा Harald Blåtand (Bluetooth) के नाम से बना हैं जिन्होंने विस्थापित डेनिश जातियों को एक राज्य के रूप में एकीकरण किया था|
Why is it that programming is harder than math?
That's not necessarily true at all. It depends on the individual person. Some people find
programming harder than math. Some people find math harder than programming. Some
people find both programming and math to be pieces o' cake. Some people are afraid of
both programming and math, and so they find both to be hard. And some people have no
idea what programming or math is.
Write a program to generate a the Number pattern?
C++:
#include <iostream>
int main()
{
for(int i = 5; i > 0; --i) {
for(int j = i; j <= 5; ++j) {
std::cout << j << ' ';
}
}
return 0;
}
What condition linear search is better than binary search?
In linear search, the searched key will be compared with each element of the array from the beginning and terminate comparing when the searched key is found or the array is reached. Here time complexity in worst case and average case is O (n).
To find an element quickly we use divide and conquer method by using binary search algorithm. Here probed region is reduced from n to n/2. Time complexity is O (log2 n), but here the array should be sorted.
But in interpolation search the probed region is reduced from n to n1/2. If the array elements are uniformly distributed the average case complexity is O (log2 (log2n)).
Am also searching for hashing to compare & contrast with above.
What is High Level Languages and Low Level Languages?
High-level and Low-level term are used to differ any computer programming language whether it is easily understandable to human or not.
High Level Language means the language is easily understandable, and
Low Level Language means the language is more to a machine language than human understandable language.
High-level and Low-level term are used to differ any computer programming language whether it is easily understandable to human or not.
High Level Language means the language is easily understandable, and
Low Level Language means the language is more to a machine language than a human understandable language.
What are the ways representing an algorithm?
You can represent an algorithm by three different ways:
1. Pseudo Code
2. Structured flow charts
3. Actual code
Can you have in-out parameter in a function if not then why?
because function have return sts thatway it is not necessary out parameter to function
A statement that contains an error in logic is?
Technically speaking, an "error in logic" (a fallacy) is a case where the premises do not properly support the argument made. Fallacies are not to be confused with factual errors, wherein the error is caused by a lack of proper information.