answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What is a Data?

Data is everything, the quesiton you asked consisted of data.

data is the entity on which programs written or work. like library systems it is student details, book details on which program works.

Abap Program To find Factorial of number?

report zbharath.

data:num type i value 5,

fac type i value 0.

perform fact using num changing fac.

write:/ 'factorial of',num,'is',fac.

form fact.

using value(f-num) type i.

changing f-fact type i.

f-fact=1.

while f-num ge 1.

f-fact=f-fact*f-num.

f-num=f-num-1.

endwhile.

endform.

What science is used in computer programming?

Computer programming relies heavily on the mathematical sciences, particularly discrete mathematics. The scientific method is often employed to test and debug computer programs. Knowledge of other sciences, such as physics or a particular social science, may be useful in computer programming depending on the specific software being programmed.

What other jobs are there like computer programming?

Very few as programming is a mixed art. It requires problem solving using logic. As well as using more artistic and creative understandings to accomplish various goals of a program. It's like being a mathematician and the conductor of an orchestra rolled into 1.

As a friend once told me, it's like being god. You make something out of nothing. Not too many jobs out there do that.

At least four differences between command line interface and graphical user interface?

The command line interface is just a type of GUI (Graphical User Interface) ie. windows 2000, xp, vista, 7. They all look different because of the different GUIs.

CLI(Command Line Interface) is more advanced, beginner users may struggle to use a CLI

GUI(Graphical User Interface) is more user friendly with graphics allowing mouse clicks etc.

CLI uses less computer resources due to being a simple command line so has its advantages over GUI.

GUI hogs more computer resources due to graphics etc.

CLI can be used to do more advanced commands and do alot of very technical processes.

GUI is very secure and offers users the things they need in plain site, point and click.

In C plus plus What symbol is used to denote the declaration of a dynamic array?

We don't generally use dynamic arrays in C++, we use vectors instead. The problem with dynamic arrays is that we must keep track of how many elements are allocated in the array, and must manually manage the memory allocated to the array, just as we do in C. Vectors do this automatically for us and allow us to pass dynamic arrays into functions by reference. This ultimately makes it much easier to use a dynamic array without having to worry about how it is physically implemented.

Is compiler a hardware?

Programming language compilers are application programs. In some publications, however, the term system software also includes software development tools (like a compiler, linker or debugger).

Is it possible to declare a variable in a method and use it in a main?

Yes you can and they are known as inner methods. You can even delcare an inner class and methods on it. However, if you want your classess accessible from multiple programs (reusability), then you should not use this practice. This type of facility is useful when you know for sure that your class or method is going to be used only once.

Why programming language is invented?

As a CPU only processes written in machine language (binary) programming languages, which uses words instead of numbers is the reason that programming languages were invented. It allows programmers to write application in programming language statements that then uses special software to convert the program into machine language. (Gaddis, Tony, Irvine, Kip; Starting out with visual basic, 2005)

Write a simple java program using exceptions?

Here's a Hello World application:

import static java.lang.System.out;

class HelloWorld

{

public static void main(string[] arguments)

{

out.println("Hello world!") //this will print out the words 'Hello world!' to the screen

} //End of main method

} //End of class HelloWorld

What are the purpose of an algorithm?

As described in the link, an algorithm (the word is based on the name of the Arabic scholar who developed the concept) is a finite list of steps that can be taken in order to solve a specific problem or to produce a certain result. It is important to note that an algorithm does not put you into an infinite loop. There is a path to a final conclusion. It was first developed as a set of procedures for doing arithmetic calculations. Algorithms can be pictured with familiar symbols (see link) like boxes, diamond shapes, circles, etc. connected by arrows showing various points of decision making, and what conclusions can be drawn if you end up at a given point (presuming you followed the 'flow' correctly, and answered the questions accurately-- and also presuming that the algorithm is rigorous.) Of course, the concept is easily applicable to all kinds of engineering and theoretical areas. Algorithms are 'heuristic', meaning that they are seen as basically unjustified, and incapable of justification in and of themselves. This is really a basic and very powerful idea. Heuristics are completely flexible, and they can grow and change as the various conclusions and outcomes are examined. nice answer

Write a program that prompts the user to enter an integer and determines whether it is divisible by 5 and 6 whether it is divisible by 5 or 6 and whether it is divisible by by 5 or 6 but not both?

#! /usr/bin/env ruby

n = gets.to_i

d = 'is not'

d = 'is' if n % 7 == 0

puts 'Your number ' + d + ' divisible by seven.'

For more accurate answer, please define the programming/script language you plan to use..

What is an example of virtual storefront?

Virtual storefront form of interactive media/electronic marketing that allows customers to view and order merchandise on their computer screens. In a virtual storefront, customers can read about the history of the product, browse through product offerings, and place orders, all through the touch of the keyboard and mouse on their computers.

What is the purpose of a procedural programming?

A procedural language is a programming language in which everything is processed in the order it appears to the computer. A computer programming language that follows, in order, a set of commands. In contrast, an object-oriented language is a language in which everything is processed depending on what happens in the program -- user input, errors, or other events. PHP is both a procedural and object-oriented language, depending on the way it is used

Name the three most popular manufacturers of the system BIOS programs?

Gateway, HiPPo, and Trenolagor.

According to "Guide to managing and maintaining your PC" by Jean Andrews the three most common are as follows:
1. AMI BIOS
2. Award BIOS
2. Phoenix BIOS

Not True. Phoenix Technologies makes the Award and Phoenix BIOS.

This is more accurate:

1. Amercian Megatrends

2. IBM

3. Phoenix Technologies

In which cases should you use the far pointers?

Far pointers are generally used with 16 bit windows application. You can also use for DOS based application for accessing VDU memory since it has huge pointer and it can be fit into the far pointers.

Well, Win32 does not distinguish between near and far addresses. Because the types NEAR and FAR are defined in WINDEF.H, they are automatically handled by the include file, which redefines them as empty strings for Win32. Thus, NEAR and FAR are ignored. If you do not include WINDEF.H, a convenient solution is to use the /D command-line option to replace the keywords by empty strings. For example:

/D_near= /D_far= /D__near= /D__far=

The increased address-space size in 32-bit Windows impacts 16-bit code in several ways:

Pointers are all 32 bits wide and are no longer near or far, and your code cannot make assumptions based on segmented memory. Window handles, handles to other objects (such as pens, brushes, and menus), and graphics coordinates have increased to 32 bits. Thus, you cannot use types such as WORD interchangeably with HWND as you could in 16-bit Windows. Message handlers must be rewritten because the different sizes can change the way information is packed in some message parameters. The larger size of graphics coordinates affects a number of function calls. The key areas of 16-bit code affected by these changes are:

Window procedure declarations, Near and far type declarations, Data types, Messages, Calls to API functions, WinMain function

Linker and loader in c language?

There is no such thing in the C language, but it is true that operating systems have a component called loader which loads binary program-files (whose source may be written in C language) into the memory and prepares them to the execution.

How do you print 1 to 100 without using loop in c?

You can use recursion:

void printNum(int i)
{ if(i <= 100)
{ printf("%d\n", i);
printNum(i + 1); } }




int main()
{
printNum(1);

return 0;
}

Flowchart to check if 12321 is palindrome or not?

i dnt have time to draw flow chart but i'll give the algorith..(only major steps)

1 :read n

2:m=n

3:if n=0 goto step 8,else goto step 4

4:r=n%10

5:rev=(rev*10)+r

6:n=n/10

7:goto step3

8:if m==rev,display "palindrome" else "not palindrome

9:stop

What is the best programming language to learn?

1: The simplest language to learn is probably Visual Basic. However it can be limiting depending on what you want to do. You can write web based applications with it. C++ is not the easiest language to learn from scratch, in fact it is probably the hardest.

Seems to me that you need to learn about programming fundamentals, fundamentals that apply to any programming regardless of language.

2: Well, what I started with was game maker. Despite when people talk down about it, it's a pretty efficient program for how easy it is to learn. When you get to 3d games, it can be pretty bad, but the outcome of the game far defeats flash. Don't believe me? Look up Clean Asia. But it's definatly a great language to start out with.

--------------------------------------------------------------------------------------------------------

Well, maybe Python or Ruby, but Visual Basic is also easy, but is not free.

Write a c program to find Armstrong number using ifstatement?

#include<stdio.h>

int main(){

int num,r,sum,temp;

int min,max;

printf("Enter the minimum range: ");

scanf("%d",&min);

printf("Enter the maximum range: ");

scanf("%d",&max);

printf("Armstrong numbers in given range are: ");

for(num=min;num<=max;num++){

temp=num;

sum = 0;

while(temp!=0){

r=temp%10;

temp=temp/10;

sum=sum+(r*r*r);

}

if(sum==num)

printf("%d ",num);

}

return 0;

}

What is the difference between dynamic implementation and linked list implemention?

The size or length of the list. For static, the size is a constant, while the size of a dynamic list may change over time.

The 7 weekdays is static (in size/length, though the content is static as well), while the questions and answers at answers.com are 2 dynamic lists (the sizes are not constants, although just growing)

What are generalised linked list?

A generalized linked list contains structures or elements with every one containing its own pointer. It's generalized if the list can have any deletions, insertions, and similar inserted effectively into it.