answersLogoWhite

0

📱

Computer Programming

A category for questions about computer programming and programming languages.

10,506 Questions

What is a criminal hacker?

Originally the term referred to people who used a razor blade and/or fingernail clippers to "hack" or roughly cut parts in electronics such as the traces on circuit boards, legs of diodes etc. Police scanners were "hacked" in order to add more memory, remove CPU processors , speed up scanning by "hacking" the crystal oscillator and replacing with faster ones. Thes methods are directly related to why computers now have more RAM, and are faster. Some of the old (and I do mean old) "hackers" devised a system in the 1960s to simultaneously send voice and data over a phone line using frequency phase shifting and filtering. A similar process used later by DSL.

"Hacking" and "Modding" evolved into things such as examining the programming of a thing. Beginning with noticing things such that by pressing certain keys or combinations of keys in certain secquences on a device could produce certain results. Following the era of IBM's "Big Blue" chess tournament, AT&T introduced the "unbeatable Tic Tac Toe Computer, and exhibited it. I, I mean a "hacker" back then, was able to beat the computer with a sequence of key presses in order to "cheat" the computer out of a move. On many Shortwave radios, Police Scanners, even cell phones etc, certain key presses are used in the programming, and could be used to alter that programming.

The keys on a keyboard of a device are a "Matrix" Keyboards use a matrix with the rows and columns made up of wires. Each key acts like a switch. When a key is pressed, a column wire makes contact with a row wire and completes a circuit. The keyboard controller detects this closed circuit and registers it as a key press to the software.

I'm going to try to keep this understandable to readers ...

Software can emulate or act like hardware.

Example: a hardware modem versus a DSP/Digital Signal Processor modem, where a chip is programmed to act like the hardware....

So, later, the focus turned even more from "hacking" the actual electronics and hardware to software "hacking" through PROGRAMMING.

A "black hat" hacker is often referred to as a microcomputer user who attempts to gain unauthorized access to proprietary computer systems. Although that could be a "cracker" ... a person cracking passwords etc.

Most often people who call themselves "hackers" are called "wannabes" by the old-timers, and nowadays are often adolescents using a program they didn't write, by clicking a button they didn't create, to do what don't understand, in an attempt to disrupt something they don't know how to fix.

"White Hat" hackers are the "good guys" like ... Like the old-timers who vastly improved what computers are capable of doing, and the ones currently trying to improve security by locating and preventing weaknesses.

This Answer is dedicated to the memory of Bill Cheek, author, The Scanner Modification Handbook series, and his BBS and Fidonet terminal (prior to "The Internet") Good man, Good freind to many... May he R.I.P.

Is c a block structured language?

Structured programming (sometimes known as modular programming) is a subset of procedural programming that enforces a logical structure on the program being written to make it more efficient and easier to understand and modify.

ref:structured programming

Hope this will help u.!!! :)

stucured language mean dividing program in to blocks or parts and executing where one block differs from other so that thr reader can understand the program easy.its just like top-down design approach

Write A program to add and multiply two very large numbers using doubly linked list?

class Node

002

{

003

private:

004

int data;

005

006

public:

007

friend class List;

008

friend class stack;

009

010

Node* next;

011

012

Node(){data = 0;}

013

014

Node(int x)

015

{

016

next = 0;

017

setdata(x);

018

}

019

020

int getdata()

021

{

022

return data;

023

}

024

025

void setdata(int x)

026

{

027

data = x;

028

}

029

030

void print()

031

{

032

cout<<data;

033

}

034

035

~Node(){}

036

};

037

038

class List

039

{

040

private:

041

Node* Head;

042

Node* Tail;

043

044

public:

045

046

friend class stack;

047

List(){Head = 0; Tail = 0;}

048

049

void addnode(int x)

050

{

051

Node *current = new Node(x);

052

053

if(Head 0)

197

{

198

return true;

199

}

200

else

201

{

202

return false;

203

}

204

}

205

206

Node* topEl()

207

{

208

return (L.top());

209

}

210

211

void printstack()

212

{

213

L.printlist();

214

}

215

216

~stack()

217

{

218

L.deletelist();

219

}

220

221

};

222

223

int main()

224

{

225

stack operand1;

226

stack operand2;

227

stack carry;

228

stack result;

229

int tempsum;

230

int a,b,c;

231

int carry1;

232

Node *n1 = NULL;

233

Node *n2 = NULL;

234

Node *n3 = NULL;

235

236

operand1.push(3);

237

operand1.push(8);

238

operand1.push(0);

239

operand2.push(5);

240

operand2.push(3);

241

operand2.push(5);

242

243

244

245

while(!(operand1.isEmpty()) && !(operand2.isEmpty()))

246

{

247

n1 = operand1.topEl();

248

a = n1->getdata();

249

n2 = operand2.topEl();

250

b = n2->getdata();

251

tempsum = a + b;

252

253

if(tempsum > 9)

254

{

255

c = 0;

256

if(!(carry.isEmpty()))

257

{

258

n3 = carry.topEl();

259

c = n3->getdata();

260

carry.pop();

261

}

262

carry1 = tempsum / 10;

263

tempsum = tempsum % 10;

264

carry.push(carry1);

265

result.push(tempsum + c);

266

}

267

else

268

{

269

if(!(carry.isEmpty()))

270

{

271

n3 = carry.topEl();

272

c = n3->getdata();

273

result.push(tempsum + c);

274

carry.pop();

275

}

276

else

277

{

278

result.push(tempsum);

279

}

280

}

281

operand1.pop();

282

operand2.pop();

283

}

284

285

n1 = operand1.topEl();

286

a = n1->getdata();

287

n2 = operand2.topEl();

288

b = n2->getdata();

289

tempsum = a + b;

290

if(carry.isEmpty())

291

{

292

result.push(tempsum);

293

}

294

else

295

{

296

n3 = carry.topEl();

297

c = n3->getdata();

298

result.push(tempsum + c);

299

carry.pop();

300

}

301

operand1.pop();

302

operand2.pop();

303

304

result.printstack();

305

306

system("pause");

307

return 0;

308

}

Is there any electrical current storage device?

Yes, once current starts going through an inductor, it tends to continue going through that inductor in the same direction -- even if that inductor is completely disconnected from everything else.

Unfortunately, all available inductors ( even superconducting magnetic energy storage systems -- see link below ) store relatively little energy.

You can, however, store the means to produce a current. A battery is such a storage device: when charged, it can produce a current in a conductor.

Also, a capacitor stores an electric charge, which when released will produce a current.

How you can find a factorial of a number without using multiple operator?

If you really wanted to do this, you could simulate multiplication with repeated addition.

Why do computers work with bits rather than decimal digits?

Ever wonder what the real numbers are? Numbers are artificial things invented by human, and the same applied to computers. So, the inventors of computers storing human readable numbers (decimal, Roman numerals, etc...) as computer readable numbers (binary). Binary fit very well with the electrical pulses (on and off, as 1 and 0)

What is increment and decrement operators?

increment operator increments the variable by 1 at a time and decrement operator decrements by 1 in this we have two types increments pre_increment and post increment.

In pre_increment the original value is incremented by 1 and assign the new value

n=10

i=++n

then i =11

In post increment the original value is assigned and after it increments value by 1.

n=10

i=n++

then i=10

example:

k=5

i=k++ + ++k

i=?

ans:

in first k++ value is 5

second ++k value is 7

i=5+7=12

What are the different symbols used in a program flow chart?

The most widely used symbols are:

1. Start and end

2. Arrows

3. Processing steps

3. Conditional Other symbols are:

4. document symbol

5. Manual Operation

6. Data file

Hypothetical decimal computer?

Hypothetical Decimal Computer A hypothetical computer is introduced, a decimal one which can operate also in four modes. The machine has 16 bit numbers, with the first bit as sign bit. The exponent is stored as a binary integer and the coefficient is stored as a sequence of decimal digits. In all modes the exponent base is 10. So in fact this computer is a multi-exponent computer with base 10. In listing the four modes are: Exponent coefficient Mode size bits size structureBCD 3 14-12 12 3 BCD-digits of 4 bits each DPD-1 5 14-10 10 3 digits in 10 bit DPD-code DPD-2 3 14-12 12 3 digits in 10 bit DPD-code preceded by one 'digit' of 2 bits PDE value=0, 1, 2 10+3 4 digits, 3 of them in 10 bit DPD-code and one combined with exponent field *****************************************************************Submitted by ADARSH.S.V.NAIR*******************************************************************

How does a high level language relate to the microprocessor's instruction set?

Generally speaking, it doesn't relate at all. If it did, it wouldn't be high-level, it would be machine-dependent. The relationship between the high-level code and the machine-code is ultimately determined by the language translator (compiler and/or interpreter) but, unlike assembly language which maps 1:1 with the microprocessor instruction set, compilers and interpreters are code generators and there is seldom a 1:1 relationship between the high-level source code and the machine code.

What computer language they use to create autocad?

Originally, Computer-Aided Design systems was developed in computer languages such as Fortran, but with the advancement of object-oriented programming methods this has radically changed. Typical modern parametric feature based modeler and freeform surface systems are built around a number of key C (programming language) modules with their own APIs. A CAD system can be seen as built up from the interaction of a graphical user interface (GUI) with NURBS geometry and/or boundary representation (B-rep) data via a geometric modeling kernel. A geometry constraint engine may also be employed to manage the associative relationships between geometry, such as wireframe geometry in a sketch or components in an assembly.

Why is BASIC considered to be a user friendly language?

It's English-like syntax is much easier to learn than many other languages.

What are registers in assembly language?

Registers are memory locations on the microprocessor itself (not in main memory). In RISC architectures generally most operations (add, multiply, etc) must take there input from registers and write their output to a register. Since registers are located directly on the microprocessor, they represent the fastest form of memory in the computer, and also the type of memory available in the least quantity.

What is the advantage of a binary search tree over an array based structure?

In a binary search tree, insertion, deletion and lookup are O(log n) (i.e. fast) when balanced.
With unsorted arrays, insertion and deletion are O(1) (i.e. very fast) but lookup is O(n) (i.e. slow).
With sorted arrays, insertion and deletion are O(n) (i.e. slow) and lookup is O(log n) (i.e. fast).

Binary search trees are good if you do all three operation (insertion, deletion, lookup) often and have enough data to justify the added burden of more complex structures and algorithms.

What are the features of OOP?

The primary features of an object oriented language are:

* Encapsulation - This allows every object to have its own properties and behaviors separate from others, and its own little "capsule" to keep its properties in. * Inheritance - This allows an object to inherit the properties of its ancestors. * Polymorphism - The allows an object to be treated like one of its ancestors, i.e. if Truck was a subclass or descendant of an object called Automobile, it can redo behaviors that Automobile had, like Automobile has a suspension feature that has it set to 10 inches tall, Truck overwrites it and says its 30 inches tall.

* Abstraction - This idea is related to encapsulation in that you don't care how the object works, but you can make it behave in certain manners.

Difference between almost complete binary tree and complete binary tree?

A full tree is a tree where all nodes except the leaves have the maximum number of children. For a BST, that would be two children per node.

A complete tree is the same thing, except that the bottom level does not need to be full. It can be missing leaf nodes, however the ones present must be shifted to the left.

Is COBOL a compiler programming language?

COBOL, the COmmon Business Oriented Language, is considered one of the forerunners of modern programming. Designed in the 1950s, it was considered the most advanced language of its time. It was commonly programmed on punch cards, which were in common use before disk storage as an input medium for stored procedures. It also had constructs considered revolutionary at that time, including self-modifying code.

Explain the Information Processing Cycle of a computer?

= What is information processing cycle? = In: Computer Terminology [Edit categories]

[Edit]

Information processing cycle of computer can be well described by the following points: (1) input, (2) processing, (3) output and (4) storage # Input-entering data into the computer. # Processing-performing operations on the data. # Output-presenting the results. # Storage-saving data, programs, or output for future use.

1. INPUTThe collection of raw data from the outside world so it can be put into an information system. Putting the acquired data into the information system. # Examples: The payroll clerk collects workers' timecards so she knows how many hours each person worked that week and types the hours from the timecards into a spreadsheet # Conducting a survey of customer's opinions and then scanning the survey cards with a card reader. # Collecting jokes for a joke book and typing jokes into a word processor. # Using a form on a website to collect visitors' opinions

Typical input devices: Keyboards, mice, flatbed scanners, bar code readers, joysticks, digital data tablets (for graphic drawing), electronic cash registers

2. PROCESSING CPU Processor - Central ProcessingUnit A central processing unit (CPU), or sometimes simply processor, is the key component in a digital computer capable of executing a program. It interprets computer program instructions and processes data. CPUs provide the fundamental digital computer trait of programmability, and are one of the necessary components found in computers of any era, along with memory and input/output facilities. A CPU that is manufactured as a single integrated circuit is usually known as a microprocessor. Beginning in the mid-1970s, microprocessors of ever-increasing complexity and power gradually supplanted other designs, and today the term "CPU" is usually applied to some type of microprocessor. Microprocessor (CPU)

Integrated circuit, also called a chip. The Brain of the computer

Composed of: ALU: Arithmetic Logic Unit: Processor Controller High speed calculator

Intel is the most popular chip

Categorized by model numbers

Higher model number=newer/faster chip

Speed of CPU is determined by clock speed

Higher the clock speed, faster the computer

Speed is measured in megahertz (MHz) Megahertz: Clock Speed of the processor (100 MHz = 100 million cycles/second). Memory or RAM Next most critical element of a processing hardware is RAM, often referred to as "primary storage" or "main memory". Random Access Memory (RAM) receives and temporarily stores data and program instructions from the CPU This data bank communicates with the CPU, constantly exchanging information and constantly changing as long as the computer is on

RAM is an active, electronic state. When the power is on, RAM retains data. When the computer is turned off, all data in RAM is erased unless you have saved it to some mass storage device. Each time the computer boots, the computer goes through it's startup routine and lastly loads operating system instructions into RAM

Random Access Memory (RAM) is the workhorse behind the performance of your computer. Working as a foot soldier for your processor, RAM temporarily stores information from your operating system, applications, and data in current use. This gives your processor easy access to the critical information that makes your programs run. The amount of RAM you have determines how many programs can be executed at one time and how much data can be readily available to a program. It also determines how quickly your applications perform and how many applications you can easily toggle between at one time. Simply put, the more RAM you have, the more programs you can run smoothly and simultaneously. To determine how much RAM you need, factor in the demands of the applications you want to run simultaneously as well as the operating system (512 MB of RAM is recommended by Microsoft as minimum for operation of Windows) Then keep in mind that you'll inevitably add new applications and create new files, and add accordingly. RAM: (Random Access Memory): (Click here to read "How Stuff Works - RAM") Types of RAM * DRAM (Dynamic RAM) This is the most common type of computer memory. DRAM needs refreshing and is refreshed hundreds of times each second in order to retain data. During recharging it cannot be accessed by the CPS * SRAM (Static RAM) SRAM is approximately 5 times faster (and twice as expensive, as DRAM). It does not have to be constantly refreshed. Because of its lower cost and smaller size, DRAM is preferred for the main memory, while SRAM is used primarily for cache memory. * SDRAM (synchronous dynamic RAM) is the standard memory offering in the PC industry and is faster than DRAM because it's synchronized to the system clock. . It is designed for mainstream home and business applications, email, and basic audio and video streaming. It provides single-channel memory and is available on our mainstream and value desktop system. * DDR SDRAM (double data rate synchronous dynamic RAM) takes all the features of ordinary SDRAM and increases the frequency bandwidth to improve system performance and speed. * RDRAM (Rambus dynamic RAM) is able to load a new stream of data before the previous stream has completed, resulting in faster access speeds. The RDRAM memory features dual-channel processing which doubles data throughput to further enhance performance. This type of memory is optimized for high-end multimedia tasks involving video and audio. Dual Channel RDRAM is shipped on our performance desktop systems powered by Pentium 4 processors * VRAM: Memory designed for storing the image to be displayed. * CACHE RAM is a small block of high-speed memory located between the Processor and main memory and is used to store frequently requested data and instructions. When the processor requests data, it will check in the cache first

Understanding the relationship between CPU and RAM The hierarchical arrangement of memory storage in current computer architectures is called the memory hierarchy. It is designed to take advantage of memory locality in computer programs. Each level of the hierarchy is of higher speed and lower latency, and is of smaller size, than lower levels. The memory hierarchy in most computers is as follows: * Processor registers - fastest possible access (usually 1 CPU cycle), only hundreds of bytes in size * Level 1 (L1) cache - often accessed in just a few cycles, usually tens of kilobytes * Level 2 (L2) cache - higher latency than L1 by 2× to 10×, often 512 KiB or more * Level 3 (L3) cache - higher latency than L2, often several MB * Main memory (DRAM) - may take hundreds of cycles, but can be multiple gigabytes. Access times may not be uniform.

3. Output In information processing, output is the process of transmitting the processing information Essentially, output is the presentation of any data exiting a computer system. This could be in the form of printed paper, audio, video. In the medical industry this might include CT scans or x-rays. Typically in computing, data is entered through various forms (input) into a computer, the data is often manipulated, and then information is presented to a human (output). Typical output devices: Monitors* Pixels: Images are created with dots of lights called picture elements, or pixels. More pixels = higher resolution. Resolution is the maximum number of pixels the monitor can display * Basic VGA is a pixel grid 640 X 480 * Super VGA is 1,024 X 768 * A video card, (also referred to as a graphics accelerator card, display adapter, graphics card, and numerous other terms), is an item of personal computerhardware whose function is to generate and output images to a display. Printers * Laser - laser beams bond toner to paper * Ink jet - fine stream of ink * Dot Matrix - pins & ribbon What else can you think of?

4. Storage Storage, or mass storage refers to various techniques and devices for storing large amounts of data. The earliest storage devices were punched paper cards, which were used as early as 1804 to control silk-weaving looms. Modern mass storage devices include all types of disk drives and tape drives. Mass storage is distinct from memory, which refers to temporary storage areas within the computer. Unlike RAM memory, mass storage devices retain data even when the computer is turned off. The smallest unit of storage is a file that contains such data as a resume, letter, budget, images or any one of the thousands of items that you may have saved for future reference. Additionally, files can be executable program files, or system files reserved for the operating system. Mass storage is measured in kilobytes (1,024 bytes), megabytes (1,024 kilobytes), gigabytes (1,024 megabytes) and terabytes (1,024 gigabytes). Examples of some mass storage devices * Disk storage - hundreds of thousands of cycles latency, but very large ** Floppy Disks: Relatively slow and have a small capacity, but they are portable, inexpensive, and universal ** Hard disks : Very fast and with more capacity than floppy disks, but also more expensive. Some hard disk systems are portable (removable cartridges), but most are not. * Tertiary storage - ** Optical storage: Unlike floppy and hard disks, which use electromagnetism to encode data, optical disk systems use a laser to read and write data. Optical disks have very large storage capacity, but they are not as fast as hard disks. Examples: CD, CD-R, CD-RW, DVD or DVD-R ** Tapes: Relatively inexpensive and can have very large storage capacities, but they do not permit random access of data. * Flash Memory - faster than disk storage, with up to 4GB or more of data, transferring (usually) over universal serial bus (USB) POONAM VALERA GUJRAT JAMNAGAR p_aum_k@yahoo.co.in

Are there any programming language that is non-English?

Yes.And it's free it's called a Text Document,once you write a command you just need to save it as ie:.txt .exe .startup .dll etc.

Time space trade off in data structure?

IN COMPUTER SCIENCE, A SPACE-TIME OR TIME-MEMORY TRADEOFF IS A SITUATION WHERE THE MEMORY USE CAN BE REDUCED AT THE COST OF SLOWER PROGRAM EXECUTION (OR, VICE VERSA, THE COMPUTATION TIME CAN BE REDUCED AT THE COST OF INCREASED MEMORY USE). AS THE RELATIVE COSTS OF CPU CYCLES, RAM SPACE, AND HARD DRIVE SPACE CHANGE HARD DRIVE SPACE HAS FOR SOME TIME BEEN GETTING CHEAPER AT A MUCH FASTER RATE THAN OTHER COMPONENTS OF COMPUTERS. THE APPROPRIATE CHOICES FOR SPACE-TIME TRADEOFFS HAVE CHANGED RADICALLY. OFTEN, BY EXPLOITING A SPACE-TIME TRADEOFF, A PROGRAM CAN BE MADE TO RUN MUCH FASTER.

THE MOST COMMON SITUATION IS AN ALGORITHM INVOLVING A LOOKUP TABLE: AN IMPLEMENTATION CAN INCLUDE THE ENTIRE TABLE, WHICH REDUCES COMPUTING TIME, BUT INCREASES THE AMOUNT OF MEMORY NEEDED, OR IT CAN COMPUTE TABLE ENTRIES AS NEEDED, INCREASING COMPUTING TIME, BUT REDUCING MEMORY REQUIREMENTS. A SPACE-TIME TRADEOFF CAN BE APPLIED TO THE PROBLEM OF DATA STORAGE. IF DATA IS STORED UNCOMPRESSED, IT TAKES MORE SPACE BUT LESS TIME THAN IF THE DATA WERE STORED COMPRESSED (SINCE COMPRESSING THE DATA REDUCES THE AMOUNT OF SPACE IT TAKES, BUT IT TAKES TIME TO RUN THECOMPRESSION ALGORITHM). DEPENDING ON THE PARTICULAR INSTANCE OF THE PROBLEM, EITHER WAY IS PRACTICAL. ANOTHER EXAMPLE IS DISPLAYING MATHEMATICAL FORMULAE ON PRIMARILY TEXT-BASED WEBSITES, SUCH AS WIKIPEDIA.

Storing only the LaTeX source and rendering it as an image every time the page is requested would be trading time for space - more time used, but less space. Rendering the image when the page is changed and storing the rendered images would be trading space for time - more space used, but less time. Note that there are also rare instances where it is possible to directly work with compressed data, such as in the case of compressed bitmap indices, where it is faster to work with compression than without compression. Larger code size can be traded for higher program speed when applying loop unrolling. This technique makes the code longer for each iteration of a loop, but saves the computation time required for jumping back to the beginning of the loop at the end of each iteration. Algorithms that also make use of space-time tradeoffs include:

BABY-STEP GIANT-STEP ALGORITHM FOR CALCULATING DISCRETE LOGARITHMS.

RAINBOW TABLES IN CRYPTOGRAPHY, WHERE THE ADVERSARY IS TRYING TO DO BETTER THAN THE EXPONENTIAL TIME REQUIRED FOR A BRUTE FORCE ATTACK. RAINBOW TABLES USE PARTIALLY PRECOMPUTED VALUES IN THE HASH SPACE OF A CRYPTOGRAPHIC HASH FUNCTION TO CRACK PASSWORDS IN MINUTES INSTEAD OF WEEKS. DECREASING THE SIZE OF THE RAINBOW TABLE INCREASES THE TIME REQUIRED TO ITERATE OVER THE HASH SPACE.

THE MEET-IN-THE-MIDDLE ATTACK USES A SPACE-TIME TRADEOFF TO FIND THE CRYPTOGRAPHIC KEY IN ONLY 2N + 1 ENCRYPTIONS (AND O(2N) SPACE) VERSUS THE EXPECTED 22N ENCRYPTIONS (BUT ONLY O(1) SPACE) OF THE NAIVE ATTACK.

DYNAMIC PROGRAMMING, WHERE THE TIME COMPLEXITY OF A PROBLEM CAN BE REDUCED SIGNIFICANTLY BY USING MORE MEMORY.

Ram is classified as what kind of storage in a computer system?

RAM is volatile storage, short-term storage or working memory. As opposed to a hard-drive which is non-volatile, long term storage or a mass-storage medium.

What is the difference between linked list and Ordinary list?

A list is an abstract data structure, usually defined as an ordered collection of data. A linked list refers to a specific implementation of a list in which each element in the list is connected (linked) to the next element.