answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What is the difference between enumrerated datatype and typedef?

Its very Simple that using Enumerated data type you are making special integers that flow within range, While a typedef is redefining data type with new name. Example: like defining enum Days{sun,mon,tue.....} makes an integer definition that can have 0-7 values So if u do following: Days x=sun; or Days x=0; then x=x+2; is 2 or tue and x=x+7; is 0 or sun again... Means its modulo 7 data type ................. While doing this: typedef Days WeekDays; renames Days as WeekDays Similary typedef int NUMBER; renames int as NUMBER .But wait it is one more name for the data type.. So simply enum creates a numeral modular datatype with a range while typedef creates another name for it. Rupesh K Joshi

Given an int array length 2 return true if it contains a 2 or a 3.?

public boolean has2or3(int[] nums) {

if ( nums[0] 3 )

return true;

return false;

}

How do you create an object for anonymous class?

public class Class1 {

protected InnerClass1 ic;

public Class1() {

ic = new InnerClass1();

}

public void displayStrings() {

System.out.println(ic.getString() + ".");

System.out.println(ic.getAnotherString() + ".");

}

static public void main(String[] args) {

Class1 c1 = new Class1();

c1.displayStrings();

}

protected class InnerClass1 {

public String getString() {

return "InnerClass1: getString invoked";

}

public String getAnotherString() {

return "InnerClass1: getAnotherString invoked";

}

}

}

we can do like . crieate inner class instanve in side of main class defalut consiter . use the object we do the our bz logic

What is the boolean search connector OR used for?

"Or" retrieves all of the records that contain "either" the first term "or" the second "or" both. It's a way of broadening your search and is typically used with synonyms.

How do you delete rooms in whirled?

You cannot delete rooms in Whirled. If you don't want others to see it, remove all links to it, and lock it in the room options (accesed when standing in the room, click the room button on bottom toolbar, click arrange room, and then toggle the locks in the top right corner so only you can enter). Deleting rooms in Whirled is counterproductive, as they cost coins, and I'm not sure why anyone would want to waste their money by throwing the room away. If you really want to get rid of the room, you can gift it (and anything in it) to a friend.

What is icr class?

Instructor Class Requirement (ICR)

What is meant by a mandatory field?

a mandatory field in a database is one created in a table as "Not null". This means, there is a "rule" on the field that when data is inserted into the table, this field cannot be empty. If it is, then the insert errors. Here's part of a table definition in my database. These field are are required to be populated when inserting into this table. ATTR_DESC_01 CHAR(2) DEFAULT SYSTEM NOT NULL
, ATTR_DESC_02 CHAR(2) DEFAULT SYSTEM NOT NULL
, ATTR_DESC_03 CHAR(2) DEFAULT SYSTEM NOT NULL
, ATTR_DESC_04 CHAR(2) DEFAULT SYSTEM NOT NULL
, ATTR_DESC_05 CHAR(2) DEFAULT SYSTEM NOT NULL
, ATTR_DESC_06 CHAR(2) DEFAULT SYSTEM NOT NULL
, ATTR_DESC_07 CHAR(2) DEFAULT SYSTEM NOT NULL
, ATTR_DESC_08 CHAR(2) DEFAULT SYSTEM NOT NULL
, ATTR_DESC_09 CHAR(2) DEFAULT SYSTEM NOT NULL
, ATTR_DESC_10 CHAR(2) DEFAULT SYSTEM NOT NULL
, PARTITION_NBR SMALLINT NO DEFAULT NOT NULL
)

What Cygwin packages do I need to download for compiling C plus plus files?

g++, gdb and make. A simple search for "Cygwin c++" will tell you all you need to know.

What is full form of Q-basic progame?

Q - Quick

B - Basic

A - All- purpose

S - Symbolic

I - Instruction

C - Code

Type of triangle with at least two sides congruent?

An isosceles triangle has 2 equal sides whereas an equilateral triangle has 3 equal sides.

What are the disadvantages of Server Side scripting?

1. It does not require the user to download plugins like Java or Flash (client-side scripting).

2. You can create a single website template for the entire website. Each new dynamic page you create will automatically use it.

3. You can configure a site to use a content management system, which simplifies the editing, publishing, adding of images, and creation of web applications. Many apps are often available in the form of extensions or addons.

4. Load times are generally faster than client-side scripting.

5. Your scripts are hidden from view. Users only see the HTML output, even when they view the source.

What is a sub program?

A sub program is a set of easily reusable code that makes a program easier to read and understand, and it also makes the file size smaller.

Why is the operation pop in the data structure stack called pop?

It stems from the analogy of a plate-stacker. That is; a recessed pit with a spring-loaded platform that pushes upwards. As plates are stacked onto the platform, the spring is compressed by the weight of the plates, pushing the platform down into the pit so only the top plate protrudes from the pit. When the top plate is removed, the stack pops up to expose the next plate.

The push and pop verbs apply to all linear sequence containers where a new element can be added at the front and/or back ends of the sequence, such as arrays/vectors, lists, queues and stacks.

Can Intel 4 run win 7?

It's depend on what you mean by "intel 4".

If you mean "pentium 4" : yes, it is fully compatible with windows 7 32-bit and some models of pentium 4 can run the 64-bit version too.

If you mean "80486" (or 486) : no, that processor can't run Windows 7 or even XP.

When are the caches useful?

When you are in short supply of something you need. Or when you want something quickly and you know where to get it.

Swapping of number with using third variable?

To swap two numbers N1 and N2, using a third variable T... T = N1;

N1 = N2;

N2 = T;

What is task?

A physical or cognitive skill that a person must accomplish during a particular age period to continue development.

Which number is the next logical number in the following sequence of numbers 2 6 14 30?

Start at 2 and double every turn

0+2=2.....2+4=6....6+8=14....14+16=30..and..30+32=62

The answer is 62!