answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What is a number without a variable?

In computer programming, a number without a variable is referred to as a "magic number," because it seems to appear out of nowhere (like magic!). This is typically considered a bad thing, as that number will have no implicit meaning.

{

diameter = 10;

area = 3.14 * diameter; // here 3.14 is a magic number

}

{

pi = 3.14

diameter = 10;

area = pi * diameter; // now the meaning of this statement is unambiguous

}

Discuss the advantages and disadvantages of a component-based approach to object-oriented software development?

Advantages

v Reduces considerably the software to be developed "in-house"

v Allows faster delivery

v In principle, more reliable systems, due to using previously tested components

v It leads to software re-used and re-usability provides a number of tangible benefits.

v It leads to reduction in development cycle time.

v It leads to significant reduction in project cost.

v It leads to significant increase in productivity.

Disadvantages

v Compromises in requirements are needed

v Less control over the system's evolution

How do you retrieve particular version of a program from endeavor in mainframes technology?

put s before the element name you want to retrieve. it will show the versions exist in endeavor in that particular stage put R before the version you want to retrieve.

CMOS is an acronym for what?

CMOS stands for Complimentary Metal Oxide Semiconductor. CMOS is a technology for constructing integrated circuits. It is widely used in Microprocessors, Micro Controllers, Static RAM. It is also used in Analog circuits such as image sensors. CMOS was patented in 1967 by Frank Wanlass. CMOS is sometimes referred as COS-MOS i.e complementary-symmetry metal-oxide-semiconductor.

What is the difference between procedure-oriented and problem-oriented in C language?

C is neither procedure-oriented nor problem-oriented. C is a structured, general purpose programming language.

Procedure-oriented programs are distinct in that code jumps around -- a lot. They do not have structured loops nor do they have procedure calls (subroutines, functions or procedures), but they do make prevalent use of jump or goto statements. As a result, procedure-oriented programs are often called "spaghetti code" due to the difficulty in both reading and maintaining the program. Machine code and assembly language are both examples of procedure-oriented languages.

Although you could theoretically write a C program using nothing but procedural programming methods, the resultant spaghetti code will be extremely difficult to read and maintain. Imagine if you couldn't use for(), while() and do..while() loops, and couldn't call any functions, not even the built-in functions. You would basically have nothing more than a single main() function with all code contained therein. Even multiple statements enclosed in braces would not be permitted in procedural-programming.

Problem-oriented programming languages are languages tailored to a particular application. Although it is possible to create a problem-oriented language within C, as a superset of C for instance, C itself is general purpose.

Can you program something in Javascript that starts a VBScript?

Yes. Just create a VBScript function/sub in the same document, and since it would be a member of the window object, Javascript would also be able to call it, like so: <script language='vbscript'>

sub test()

alert("test")

end sub

</script>

<script language='javascript'>

test();

</script>

Is adobe shockwave player okay for computers?

"Okay" meaning what, exactly?

It generally will not harm your computer and is required for a fair amount of internet content.

From which language the word computer is taken?

A "Latin" word Compute which means "calculate"

Aqeel Bukhari

nmcitc@yahoo.com

Which protocol do web browsers and web servers use most often?

Hyper Text Transfer Protocol is the most common protocol used by web servers. It is commonly referred to as HTTP seen in the beginning of web addresses.

Write a program to find the square root of the quadratic equation?

import java.io.*;

public class quadratic

{

private String str;

public quadratic()

{

str = "";

}

public quadratic(String str)

{

this.str = str;

}

public void accept()throws IOException

{

BufferedReader br= new BufferedReader(new InputStreamReader(System.in));

System.out.println("Enter the equation in terms of x \nEg: 1x^2+4x+5=0 \nAnd you will receive the possible results of x");

str= br.readLine();

}

public void solve()

{

String A[]=new String [8];

int l=str.length();

int j=0;

char c=' ';

String w="";

for(int i=0;i<7;i++)

{

while(true)

{

c=str.charAt(j);

if(c!='+'&&c!='-'&&c!='=')

w=w+c;

else

{

if(i==4)

A[i]="0"+w;

else

A[i]=w;

i++;

if(i>6)

break;

A[i]=" "+c;

j++;

break;

}

j++;

if(j>=l)

break;

}

w="";

}

System.out.println(A[0]);

System.out.println(A[2]);

System.out.println(A[6]);

int len=A[0].length();

String M=A[0].substring(0,(len-3));

len=A[2].length();

String B=A[2].substring(0,len-1);

int a=Integer.parseInt(M);

int b=Integer.parseInt(B);

int C=Integer.parseInt(A[4]);

if(A[3].equals(" -"))

C=-C;

if(A[1].equals(" -"))

b=-b;

double D=(double)Math.sqrt(b*b-4*a*C);

double ans1=(-b+D)/(2*a);

double ans2=(-b-D)/(2*a);

System.out.println("The values of x are: "+ans1+" and "+ans2);

}

public static void main(String args[])throws IOException

{

quadratic ob = new quadratic();

ob.accept();

ob.solve();

}

}

Different types of alphanumeric code?

ASCII

EBCDIC

Unicode search wikipedia for knowing more about these alpha numeric codes!

Why cant you edit a pdf file?

The portable document format, more commonly known to the rest of the world as "PDF," is a file format that is recognized by various desktop publishing applications and software. PDF's allow users to send documents exactly as they were made.

In general, however, most PDF's restricts or blocks the information they contain. Hence, users have actively sought after programs that can effectively unlock PDF files.

So if you want to edit a PDF file, what you need to do is to find tools.

Why in the Properties window do you change some properties with a drop-down list or a dialog box while you change others by typing a value?

It depends on the programmer. However, in general, where a property has a finite set of values you will be given a drop down box, but some, such as comments, cannot provide a drop down so you get a text box instead. Some also provide a drop down as well as a text box, such as a date picker where you can either type a date in full or simply select it from a calendar-like drop down. Numeric values can also be entered manually but many numeric inputs also use "tumblers" to increment/decrement the current value.

How do you make a batch file wait?

Use the 'pause' command. The pause command will make a "press any key to continue..." message. If you don't want this to show up, use "pause >nul". This will make the batch file wait without the pause message.

Who are the people involve in making a program computer?

Primarily analysts, designers and programmers. In addition there will be documentation authors and alpha testers, as well as resource designers (2D/3D artists, photographers, video specialists, sound artists, etc).

Differentiate schema and instance?

Database Instance

The term instance is typically used to describe a complete database environment, including the RDBMS software, table structure, stored procedures and other functionality. It is most commonly used when administrators describe multiple

instances of the same database.Also Known As: environment

Examples: An organization with an employees database might have three different

instances: production (used to contain live data), pre-production (used to test new

functionality prior to release into production) and development (used by

database developers to create new functionality).

RELATION SCHEMA

A relation schema can be thought of as the basic information describing

a table or relation. This includes a set of column names, the data types associated

with each column, and the name associated with the entire table. For example, a

relation schema for the relation called Students could be expressed using the

following representation:

Students(sid: string, name: string, login:

string, age: integer, gpa: real)

There are five fields or columns, with names and types as shown above.