answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What are the modals?

an auxiliary verb that expresses necessity or possibility. English modal verbs include must, shall, will, should, would, can, could, may, and might.

List of command used in c language?

It's easy: there are no commands in C, but a few statements (such as: expression, if, else, switch, while, do-while, for, break, continue, return and goto), and countless library functions (like printf, malloc and fopen).

Time and space complexities of various sorting methods?

Bubble sort-O(n*n)-in all cases

Insertion sort-O(n*n)-in avg and worst case in best case it is O(logn)

Quick Sort-0(nlogn)-in avg n best case and 0(n*n)-in Worst case

selection sort-same as bubble

Linear search-o(n)

Binary Search-o(nlog)

Any doubt mail me-jain88visionary@rediffmail.com

Examples of programming language?

There are hudreds of Programming languages out there.

Examples: C++, GWbasic, C#, C++, HTML , Ruby etc.

They're further categorized as "Low Level language" and "High Level Language".

Low level languages are those languages which are closer to the binary language or in another words machine language. These are difficult for us to learn but it's easy for machine to execute quickly.

Example of a low level language is assembly language.

High level languages are those languages which are close to human language/natural language and are easy for us to learn.

Examples of high level language are Python, Ruby, C++ , Java etc.

What is an unsigned integer?

Having an unsigned integer means that the integer is positive, and not negative; literally, the integer is unsigned and assumed to be positive. The unsigned integer 8 is positive-eight, not negative-eight.

What is the program NTLDR?

NTLDR is A boot loader is a special program whose purpose is to load other software and files that are required to bring the computing system into a ready-to-run state. NTLDR is an abbreviation for New Technology Loader, and it is the boot loader for all the releases of Microsoft's Windows NT operating system up to Windows Server 2003 and Windows XP. In Windows Server 2008 and Windows Vista, NTLDR has been replaced by Windows Boot Manager and winload.exe

NT Loader requires the following two files for its proper functioning:

NTLDR - It contains the main boot loader.

Boot.ini - It contains the configuration options.

There are 3 step to repair ntldr error

If you got ntldr error then there is a 94% chance that your computer has registry problems. To repair ntldr error you need to follow the steps below:

* Step 1 - Download a ntldr error repair tool,install this error repair tool.

* Step 2 - Click the Repair All Button.It will scan you PC for Free.

* Step 3 - Then click the Repair All Button again and your done! It is very easy to repair ntldr error.

Here are the URL of ntldr error repair tool:

http://www.FixErrorsEasy.com/ttfix-ntldr_error-Fix05

Examples of primitive and non primitive scheduling?

The latter isn't primitive. Most likely it means 'non trivial', 'adaptive' or 'sophisticated'.

What kind of programs is it used to create procedural programming?

Procedural programming has been used for thousands of graphical applications, The most well known application it has been used for is the creation of the operating system known as Linux. despite there being numerous variations of Linux that are available for anyone to use free of charge due to it's open source nature, each of these variations uses procedural programming to create the kernel that is runs from. The kernel itself is created in the procedural programming language known as Python.

I hope this is a better answer than the one before it :)

What is programming concept?

An aspect-oriented programming language is another name for an aspect-oriented language - a computer programming language which aims to increase modularity by allowing the separation of crosscutting concerns.

How do you sort a queue?

You don't. Queues are a first in, first out structure, specifically used to process incoming data in the same order it arrives. If you want to sort a data sequence then use an array or a list.

How many data types can the elements of an array have?

Depends on your language. Assuming java: If you make it an Object[] then it can contain any object

For primitive types you must either make a primitive type array, ie double[], char[] which can contain only those primitives, or creater an Object[] and use primitive wrapper objects ie java.lang.Integer etc.

What is array variable?

  1. An array is a variable containing multiple values. Any variable may be used as an array. There is no maximum limit to the size of an array, nor any requirement that member variables be indexed or assigned contiguously. Arrays are zero-based: the first element is indexed with the number 0.

When operator function is declared as friend function?

Ideally, never. Friend functions should only be employed when a function (whether an operator overload or not) requires private access to a class, and it is not otherwise possible to provide a public interface without unduly undermining the class encapsulation. However, as programmer, it is your responsibility to ensure all friend functions adhere to the same class rules (which you yourself define) as do the members of your class, even though friends are not regarded as being members of the class. Ultimately, if you have no control over the friend function implementation, then you must not allow that function to be a friend of your class, as this will seriously undermine the encapsulation.

What is BufferedReader in java?

in java buffering is used for handling i/o streamswhen you use an unbuffered stream the data is directly transferred from the source to whatever.when you use buffered stream the data is taken from the source and placed into something like a holding area. then the information can be taken from this holding area at will which makes buffered streams more efficient.for example when you load a vid on youtube once part of it loads you can use play anypart of the loaded vid. that's not exactly how it works but it gives you a general sense.

Can static variables be changed?

No, a static variable means that there is only one copy of that variable, and it is shared by all members of the class, or by all callers of a function.

A variable that is read-only would be marked as const or final (depending on language).

Difference between C and C plus plus languages?

C was the C++ predecessor. As it's name implies, alot of C remains in C++. Although not actually being more powerful than C, C++ allows the programmer to more easily manage and operate with Objects, using an OOP (Object Oriented Programming) concept.

C++ allows the programmer to create classes, which are somewhat similar to C structures. However, to a class can be assigned methods, functions associated to it, of various prototypes, which can access and operate within the class, somewhat like C functions often operate on a supplied handler pointer.

Although it is possible to implement anything which C++ could implement in C, C++ aids to standarize a way in which objects are created and managed, whereas the C programmer who implements the same system has alot of liberty on how to actually implement the internals, and style among programmers will vary alot on the design choices made.

In C, some will prefer the handler-type, where a main function initializes a handler, and that handler can be supplied to other functions of the library as an object to operate on/through. Others will even want to have that handler link all the related function pointers within it which then must be called using a convention closer to C++.

To finish this discussion, C++ applications are generally slower at runtime, and are much slower to compile than C programs. The low-level infrastructure for C++ binary execution is also larger. For these reasons C is always commonly used even if C++ has alot of popularity, and will probably continue to be used in projects where size and speed are primary concerns, and portable code still required (assembly would be unsuitable then).

Benefits and limitations of object oriented analysis and design?

Advantages of OOP Object-Oriented Programming has the following advantages over conventional approaches: * OOP provides a clear modular structure for programs which makes it good for defining abstract datatypes where implementation details are hidden and the unit has a clearly defined interface. * OOP makes it easy to maintain and modify existing code as new objects can be created with small differences to existing ones. * OOP provides a good framework for code libraries where supplied software components can be easily adapted and modified by the programmer. This is particularly useful for developing graphical user interfaces. Let's distinguish two sorts of disadvantages: * OO is often provided through such imperfect vehicles as C++ and Java [discuss their defects]; and * OO is inapplicable because [explain many mismatches

K E Narayana B.E., M.Tech.,(M.B.A) Wipro Technologies

Why prims algorithm is better than kruskals algorithm?

"What are difference between Prim's algorithm and Kruskal's algorithm for finding the minimum spanning tree of a graph?"

Prim's method starts with one vertex of a graph as your tree, and adds the smallest edge that grows your tree by one more vertex. Kruskal starts with all of the vertices of a graph as a forest, and adds the smallest edge that joins two trees in the forest. Prim's method is better when * You can only concentrate on one tree at a time * You can concentrate on only a few edges at a time

Kruskal's method is better when * You can look at all of the edges at once * You can hold all of the vertices at once * You can hold a forest, not just one tree

Basically, Kruskal's method is more time-saving (you can order the edges by weight and burn through them fast), while Prim's method is more space-saving (you only hold one tree, and only look at edges that connect to vertices in your tree).

Vb program to find roots of quadratic equation?

Dim a, b, c, undroot, root, posx, negx, x1, x2 As Single

Private Sub cmdcompute_Click()

a = txta.Text

b = txtb.Text

c = txtc.Text

If txta.Text = "" Then

MsgBox "Please enter the value of A ", 0 + 32

Exit Sub

End If

If txtb.Text = "" Then

MsgBox "Please enter the value of B ", 0 + 32

Exit Sub

End If

If txtc.Text = "" Then

MsgBox "Please enter the value of C ", 0 + 32

Exit Sub

End If

If a = 0 Then

MsgBox "A can't equal 0 ", 0 + 32

Exit Sub

End If

If (b ^ 2) - 4 * a * c < 0 Then

txtx1.Text = ""

txtx2.Text = ""

MsgBox "Imaginary solution : (b^2)-4*a*c < 0", 0 + 48

Exit Sub

End If

'Calcualtions

undroot = (b ^ 2) - 4 * a * c

root = undroot ^ (0.5)

posx = (b * -1) + root

negx = (b * -1) - root

x1 = posx / (2 * a)

x2 = negx / (2 * a)

'Displaying results

txtx1.Text = " " & x1

txtx2.Text = " " & x2

End Sub

How do you make a script in interactive buddy?

a programming script is pretty high-tech, i, being a kid at quite a young age, obviously had troubles with this, but you can describe a script as a coding language that can modify the motion, physical behavior, and changes to an object in a game.you will need to piece these codes together for the language to lock up in reaction chains for them to work.here are oen of the scripts i can come up with:

fog

water(getBuddyX(), 0, 0, 0, 10, 10, 400, 400, false));

this script creates a large, but not actually very harmful, blast of water, which is the "fog".you dont need to worry about the first three zeros, but the last four numbers are critical for the type of the fog.the higher number the number you tune up for the first two, will determine the pressure of the fog.if you turn it any higher than 20, your buddy will be thrown across the wall by the force of it.if you tune it up over 50, your buddy will be instantaneously knocked out by it.the last two numbers determine the density of the fog.the lower the number, the less fog there is, and the higher the numbre, the bigger the fog is.the fog is mainly used for the cool effect and to put out widespread fires.run it every frame for a continous fog, or once for a quick punch of it.

What is null pointer assignment?

This error message means that somewhere in your program you have used a pointer-varible containing NULL-value. (Within an actual OS it with stop the program immediately, but in MS-DOS it doesn't.)

What Features of algorithm?

  1. It should be simple.
  2. It should be clear with no ambiguity.
  3. It should lead unique solution of the problem.
  4. It should involve finite number of steps.
  5. It should have the capability to handle some unexpected situations which may arise during the solution of a problem(for eg: Division with zero).

How can a virus get onto a computer?

Viruses usually spread to your computer disguised as a useful program that you download and install yourself. Viruses can also spread by exploiting bugs in programs many people use, like Microsoft Outlook, in order to run code on your computer that will let them install themselves. Viruses can spread this way in both emails and files.

What does a 2 dimensional array do?

A two dimensional array is a one-dimensional array of one-dimensional arrays. That is, just as we can have an array of integers, we can also have an array of integer arrays. This idea can be extended such that we can have an array of two-dimensional arrays (a three-dimensional array), and so on. We typically use a two-dimensional array to represent a table of rows and columns, where each row is a one-dimensional array.