The Internet is a WAN. It "INTERconnects NETworks" over the widest area possible, the Earth.
You cannot invoke a constructor explicitly. It will get invoked implicitly when you call the new keyword on the class to create an object of the class.
Ex:
private ClassExample obj = new ClassExample();
here this new keyword usage on the ClassExample class will invoke the constructor of this class and create an object of that class.
#include<stdio.h>
#include<graphics.h>
#include<math.h>
#include<conio.h>
#include<dos.h>
#include<alloc.h>
#include<stdlib.h>
#define RAD 3.141592/180
class fig
{
private:
int x1,x2,y1,y2,xinc,yinc;
public:
void car()
{ xinc=10;yinc=10;
x1=y1=10;
x2=x1+90;y2=y1+35;
int poly[]={x1+5,y1+10,x1+15,y1+10,x1+20,y1,x1+50,y1,x1+60,y1+10,x1+90,y1+17,x1+90,y1+20,x1+5,y1+20,x1+5,y1+10};
setfillstyle(SOLID_FILL,LIGHTGRAY);
setlinestyle(SOLID_LINE,1,2);
setcolor(4);
drawpoly(9,poly);
line(x1+15,y1+10,x1+60,y1+10);
line(x1+20,y1+10,x1+20,y1);
line(x1+35,y1+10,x1+35,y1);
line(x1+50,y1+10,x1+50,y1);
floodfill(x1+18,y1+8,4);
floodfill(x1+28,y1+8,4);
floodfill(x1+36,y1+8,4);
floodfill(x1+52,y1+8,4);
setfillstyle(SOLID_FILL,4);
floodfill(x1+18,y1+12,4);
setfillstyle(SOLID_FILL,BLUE);
bar(x1+5,y1+20,x1+90,y1+25);
setcolor(DARKGRAY);
circle(x1+20,y1+25,8);
circle(x1+20,y1+25,6);
setfillstyle(1,8);
floodfill(x1+21,y1+25,8);
circle(x1+70,y1+25,8);
circle(x1+70,y1+25,6);
floodfill(x1+71,y1+25,8);
int size=imagesize(x1,y1,x2,y2);
void far *buf=farmalloc(size);
getimage(x1,y1,x2,y2,buf);
while(!kbhit())
{ putimage(x1,y1,buf,XOR_PUT);
x1+=xinc;x2+=xinc;
if(x2<(getmaxx()-10))
putimage(x1,y1,buf,COPY_PUT);
else
{ cleardevice();
x1=10;x2=x1+90;
y1+=yinc;y2+=yinc;
if(y2<(getmaxy()-10))
{ putimage(x1,y1,buf,COPY_PUT);
}
else {y1=10;y2=y1+35;}
}
delay(200);
}
farfree(buf);
getch();
}
}
}
}
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,"d:\\cplus");
fig f;
f.car();
cleardevice();
closegraph();
}
Which computer programming languages are the standard?
The older languages are still the standards by which modern programming languages are measured. Fortran, COBOL, Lisp, and C/C++ are all used as baselines to evaluate newer languages. Of course, the "new kids" are being used as standards more and more often. Java, Ruby, Perl, Python, and other more modern languages are being used to measure how "good" a new language is.
In programming, a regular expression is an expression that explains a pattern for a string. A string matches a regular expression if that string follows the pattern of that regular expression. For example, you may want to create an account system, allowing usernames to only have uppercase and lowercase letters, and numbers. While a user is registering, you can check their desired username against a regular expression involving only alphanumeric characters (A-Z, a-z, 0-9). If it matches, then the username is valid to your requests. If it does not, the user has put in a character that does not follow the pattern of the regular expression. In regular expressions, you can match certain characters, match a certain quanity of characters, match the casing of characters (or just ignore it overall), and plenty more. The syntax of a regular expression varies throughout every programming language, but Perl is often used due to its wide variety of options. Perl is also incorporated into many web languages, such as PHP, making regular expressions less of a hassle. This is an example of a Perl regular expression, allowing a string with only alphanumeric characters (any character case), and an infinite length (except for a string with no length or no characters, in which the regular expression does not match the string): /^(?i)[a-z0-9]+$/
What is the difference between C programming and CPP programming?
C has no object oriented support. C++ is a superset of C that adds object-oriented support, but retains the concept of primitive variables. C# is a superset of C++, developed by Microsoft, that removes the concept of primitives, making it fully object-oriented but, unlike C and C++, is non-generic and is only useful for .NET programming. C# is not unlike Java, but Java is fully cross-platform and therefore has much wider support.
What are advantages and disadvantages of Round Robin scheduling algorithm?
Pure round robin scheduling processes A, then B, then C, then starts at A again.
(A, B, C might be tasks in an operating system context, or devices in a master/slave control network, or whatever.)
That is, pure round robin scheduling doesn't acknowledge priorities, and does not allow out-of-order processing.
Real-life systems typically use a mixture of algorithms that, together, allow for prioritized and out-of-order processing while, on the other hand, trying to prevent starvation of lower priority items.
What is the basic part of the computer and its function?
Hardware is physical part of a computer and software is piece of code that runs the computer. For instance, violin is hardware and music is the software.
New modern computers used small electronic components, which can be imprinted on the surface of silicon chip.
The most generally used electronic component is transistor.
Transistor work as a like a amplifying valve for a flow of electrons.
The transistor is a solid-state device, which has no moving parts. Basically, it is a building block for constructing more complex electronic components.
Vacuum tube was used before the invention of transistor.
Since than transistor have been made smaller and smaller and making more and more of them to be imprinted on silicon chips.
Central processing units is referred to as a
“brain” of computers.
It is hardware with in a computer and carries out the instruction of computer program.
CPU runs the code and manipulates the data, while components have quite more passive roles.
For instance storing data.
In older days, CPU requires one or more printed circuit board.
After the invention of microprocessor, CPU could be remained with in silicon chips.
There are two main components of CPU, arithmetic logic unit which performs the arithmetical and logical side and control unit which carry the instruction from memory, decodes and process them.
Random Access memory is temporary storage device.
Random access memory let any data to store and access quickly in random order while in other storage device such as Hard disk, CDs, and DVDs etc. read and write the data only in predetermined order. It is because of mechanical design limitation.
The main features of RAM are that it can keep its state as long as power is on.
Hard drive is a long-term storage for bytes as files and folders.
The hard disk drive read the write the magnetic patterns magnetic patterns on a spinning metal disk to store data.
Flash drive is also a solid-state drive with silicon chips to store bytes.
In both case, hard disk drive or flash drive maintain its state of storage even when the power is turn off.
Is the instructions programmers have written in a higher level language?
"BASIC" is not a program, it is a programming language. A particular BASIC-interpreter or IDE may have been written in a high level language, maybe even in BASIC (C is more plausible though).
Structured designing is clean. It is hard to imagine computer programming without thinking of it as being structured. Structure or a structured approach is built into the very concept of programming. By adding your own structure, you can, as a programmer, add order, power and usefulness to your program.
Modern programs are complex. The computers that manipulate them are very fast. A small mistake can go far in destroying value ( or maybe the entire human race! ). So be clear, be organised and be simple. Even the most complex tasks and algorithms can be implemented with utmost simplicity if you keep on breaking them down to logical levels.
Good Luck!
What is text-based programming?
Object Oriented Programing allows the user to interact with the program via user interface, (buttons, checkboxes, ect.) Console programs are just a black screen with white letters. Sometimes, this is efficient though. Not all programs need to look nice.
How do you write a c program to convert binary to decimal by using while statement?
write a c++ program to convert binary number to decimal number by using while statement
What are the advantages and disadvantages of logic programming?
Logic programming has a number of advantages and disadvantages, and here are some of them:
Advantages:
• Logic programming can be used to express knowledge in a way that does not depend on the
implementation, making programs more flexible, compressed and understandable.
• It enables knowledge to be separated from use, ie the machine architecture can be changed
without changing programs or their underlying code.
• It can be altered and extended in natural ways to support special forms of knowledge, such
as meta-level or higher-order knowledge.
• It can be used in non-computational disciplines relying on reasoning and precise means of
expression.
Disadvantages:
• Initially, due to insufficient investment in complimentary technologies, users were poorly
served.
• In the beginning, poor facilities for supporting arithmetic, types, etc. had a discouraging
effect on the programming community.
• There is no adequate way of representing computational concepts found in built-in
mechanisms of state variables (as is usually found in conventional languages).
• Some programmers always have, and always will prefer the overtly operational nature of
machine operated programs, since they prefer the active control over the 'moving parts'.
Under DOS a file name can contain up to characters?
8 characters a decimal the 3 letters for extension. 8.3
How does the assembly language can be executed by CPU?
Assembly language programs are the Low level programs. We write Assembly Language program in basically 8085 and 8086 microprocessors.
We can have several registers to do opreations with. Accumulator is one most important Register in a assembly program.
We use several instructions like..
Arithmetic:
INR - Increment Accumulator
ADD B - Add Content of Reg. B with Accumulator
SUB, etc.
Logical:
AND - Bitwise AND
Jump Instriction:
JZ label - Jump to label if ZERO flagged
JC Label - Jump on Carry
Etc..
Example:
MVI B, 06 //Load Register B with the Hex value 06
MOV A, B //Move the value in B to the Accumulator or register A
MVI C, 07 //Load the Register C with the second number 07
ADD C //Add the content of the Accumulator to the Register C
STA 8200 //Store the output at a memory location e.g. 8200
HLT //Stop the program execution
What is the disadvantage of high level languages?
Strongly typed languages may require explicit casting operations or type-translation services, possibly even involving runtime operations, to translate one type from another. This can sometimes be seen as undesirable code clutter, especially in context with rapidly prototyped scripts and similar tasks.
A strong typing system is paramount to solid quality programming, and is generally considered an advantage.
Could please list the different programming languages?
COBOL, Fortran
C, C#, C++, Java
Object C
JavaScript
Smalltalk
Ada
APL
Lisp
F#
X++
Icon
SPSS
RPG
Unix Shell script
Perl
...
It's a Catholic School owned by the Carmelite Missionaries. They are located in the following areas:
=) Sacred Heart Village, Novaliches, Quezon City - Kinder to High School
=) D. Tuazon Ave., Quezon City - Kinder to Grade VI
=) Dingle, Iloilo - Nursery, Kinder, Prep and High School
How many characters can be taken as command line arguments?
Platform dependent. Many in unix, few in WinDos.
Examples of embedded system development?
embedded system is an electronic device which is made for an specific task.when we are taking about the embedded system development.it include the embedded life cycle,in which we have to specify the product ect,up to maintanence
What are the drawbacks of assembly level language?
The assembly language does not support object oriented program
so they change to c and c++ the c++ will support object oriented program
this are the demerits of assembly language.
A tetrahedron is a 3 dimensional shape bounded by 4 triangular faces. It has 4 vertices and six edges. Three faces meet at each vertex so that the shape is self-dual.
How can you increase the size of a statically allocated array?
/* Allocate space for an array with ten elements of type int. */
int *ptr = malloc(10 * sizeof (int));
if (ptr == NULL) { /* Memory could not be allocated, the program should handle the error here as appropriate. */ realloc It is often useful to be able to grow or shrink a block of memory. This can be done using realloc which returns a pointer to a memory region of the specified size, which contains the same data as the old region pointed to by ptr (truncated to the minimum of the old and new sizes). If realloc is unable to resize the memory region in-place, it allocates new storage, copies the required data, and frees the old pointer. If this allocation fails, realloc maintains the original pointer unaltered, and returns the null pointer value. The newly allocated region of memory is uninitialized (its contents are not predictable). The function prototype is void *realloc(void *pointer, size_t size);
Write a program to add two integers using c plus plus?
#include<iostream>
int main()
{
int a=40;
int b=2;
std::cout<<a<<'+'<<b<<'='<<a+b<<std::endl;
}
Output:
40+2=42