Who is the author of Borland Turbo C?
A company called Borland. (Actually it was based on the former product Wizard C of Bob Jervis.)
Why the built in pointer a useful feature of the microscope?
It gives users a better way to identify and point out certain parts of the slide. The feature also highlights special aspects Êor characteristics found among the selection.
What is difference constructor and function in programming C plus plus?
A Constructor is called when you are making a new instance of a class and member functions are functions that you can call within your class or else call using the instance of that class.
for example
class Foo {
public:
int bar;
Foo(int bar) {this->bar = bar;}
inc_bar(); {this->bar++;}
};
Foo instance(10); // Constructor is called and bar is set to 10
cout << instance.bar << endl;
instance.inc_bar(); // call the member function to increment bar
cout << instance.bar << endl;
What is difference between source programm and an abject module?
Source code is the "source" of a program. This means that this is the code provided by a programmer in a human readable and modifiable form. When a programmer writes a program, he/she will develop source code in a programming language such as C, C++, maybe Pascal among others.
An object module can mean two different things depending on the context. An object module generally is an intermediate step between source code and an executable file like a .EXE on Windows. An executable file is actually what is generated by a compiler (like GCC or Visual C++) from source code and is effectively "machine language". It is not human readable and to a certain extend is not even machine readable as a whole. The way it works is that part of an executable file contains information to tell the operating system how to read the file into memory and where to start running it. The operating system will then tell the CPU where to start reading the program while it is in memory. The executable is a series of instructions understandable by the CPU and it performs them one by one as the program defines. Consider this overall process of compiling as someone writing a recipe for a certain type of food and then another person will compile a list of instructions in way that a resturant kitchen staff can follow it over and over. A different compiler might even translate the recipe to a different spoken language. In a similar fashion, one compiler might translate from C to Intel x86 while another would translate to IBM PowerPC.
An object file often is an intermediate step between source and executable. This file is the result of compiling a single source file as opposed to all the source files of an entire program. Some programs fit in a single source file, but others can be hundreds or even thousands of source files. To compile the Linux kernel in it's full form as a single static executable can require compiling tens of thousands of files. Once each file is mostly translated to machine language and stored as an object file, a program called a linker is used to merge those files together into a single executable. This process might be seems as taking the recipe for and English muffin, another for hollandaise sauce and a final one for Eggs Benedict and merging all the steps together into a single recipe which a kitchen staff can execute in a given order to start with raw ingredients and produce the final product.
What is the difference between preprocessor directives and header files?
Preprocessor: All the preprocessor commands written in a high level language are processed by the preprocessor before compiler takes over.
Example: "#define MAX_ROWS 10"
Preprocessor finds all the places and replaces MAX_ROWS with 10 in the files of the project.
Compiler: This software, converts the code written in high-level language into object file. Compiler converts all the files of a given project at once.
Is c procedural or structural language?
Structural language is a language in which a particular structure is defined. It is used to make execution and understanding easier.
Ex : COBOL
Structural language does not have function calls.
Procedural language is a language in which function calls are allowed.
Ex : C
In this a particular procedure is followed every time.
IMB.
What are the rules of creating identifier?
Identifiers refers to the names of variables, functions and array. These are user defined names and consist of a sequence of letters and digits, with a letters as a first character.Both uppercase and lowercase letters are permitted, although lowercase letters are commonly used. The underscore character is also permitted in identifiers. It is usually used as a link between two words in long identifiers.
In C, identifiers may contain any alphanumeric characters (a-z, A-Z, 0-9) as well as underscores (_), but must not begin with a number.
Why should you indent the statement in the body of a loop?
In some programming languages like Python, the indentation of the text indicates how nested it is and is required for a loop to function properly. However, for most languages, indenting the body of the loop is simply for style and readability.
Is there anything similar between C and C plus plus with reference to data hiding?
No. Data hiding is a feature of object oriented programming. C does not support OOP, and therefore has no private member access. All members are public in C.
What is the importance of data sturture in a programming language?
According to Wikipedia-"In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.Data structures are used in almost every program or software system. Data structures provide a means to manage huge amounts of data efficiently, such as large databases and internet indexing services. Some formal design methods and programming languages emphasize data structures, rather than algorithms, as the key organizing factor in software design."
What are some manifest functions of using the internet?
By helping the world connect through our computers.
What are the properties of binary tree?
What time of loop is used when you know how many times the loop instructions should be processed?
It's best to use a for loop.
For example, if you want 10 iterations:
for (int i = 1; i <= 10; i++)
{
// Any commands you write here will repeat 10 times.
}
Flowchart to find the sum of the square of first 30 even numbers?
The flowchart in deriving the sum of the square root of first N even numbers, You may follow the steps provided below:
# Draw the start symbol then a flow line connecting to item #2 # Draw the init box for the syntax: set variable_A=0, variable_Chk=0, variable_Sum=0, variable_Sqrt, then a flow line connecting to item #3 # Draw the input box and write variable_A then a flow line connecting to item #4 # Draw the decision box for 'Is variable_A not numeric?'. if yes, draw a flow line connecting to item#3 else draw a flow line connecting to item#5 # Draw the process box for the syntax: compute variable_Chk=variable_A / 2 then a flow line connecting to item #6 # Draw the decision box for 'Is variable_chk not whole number?. if yes, draw a flow line connecting to item #3 else draw a flow line connecting to item #7 # Draw the process box for the syntax: compute variable_Sum=variable_Sum + variable_A then a flow line connecting to item #8 # Draw the decision box for 'Do you want to add another number?'. if yes, draw a flow line connecting to item#3 else draw a flow line connecting to item #9 # Draw the process box for the syntax: compute variable_Sqrt=SQRT(variable_Sum) then a flow line connecting to item #10 # Draw the output box and write variable_Sum, variable_Sqrt then a flow line connecting to item #11 # Draw the end symbol.
Where:
variable_A contains a given N number, variable_Chk contains the quotient of variable_A / 2, variable_Sum contains the sum of N numbers and variable_Sqrt contains the result.
How many types of classes in c?
There are no classes in a C program.C is not a object oriented programming language only object oriented programming language has classes c++ is a object oriented programming language.
Class can be defined as a blueprint from which individual objects are created.eg:Car is a Class BMW is an Object of that class.
Join http://www.c-madeeasy.blogspot.com for c programming source codes,tutorials and advanced programming advice.
What is the code for date validation in c plus plus?
You need to check the day, month and year separately, to ensure they are within range. You also need to deal with leap days (29th February) which is every 4 years, but not the 100th unless it is the 400th. Finally, you need to deal with the change from the Julian to Gregorian calendars, which skips the 5th to 14th October, 1582.
bool checkdate(unsigned int d, unsigned int m, unsigned int y)
{
return( !(( d<1 d>31 m<1 m>12 ( y==1582 && m==10 && (d>4 && d<15 )))
( d==31 && ( m==2 m==4 m==6 m==9 m==11 ))
( m==2 && ( d>29 ( d==29 && ( y%4 ( !( y%100 ) && y%400 )))))));
}
What is the difference between Oracle data types char and varchar2?
Character string values storage:
1. CHAR:
§ Stores strings of fixed length.
§ The length parameter s specifies the length of the strings.
§ If the string has smaller length it padded with space at the end
§ It will waste of a lot of disk space.
§ If the string has bigger length it truncated to the scale number of the string.
2. VARCHAR:
§ Stores strings of variable length.
§ The length parameter specifies the maximum length of the strings
§ It stores up to 2000 bytes of characters
§ It will occupy space for NULL values
§ The total length for strings is defined when database was created.
3. VARCHAR(2):
§ Stores strings of variable length.
§ The length parameter specifies the maximum length of the strings
§ It stores up to 4000 bytes of characters
§ It will not occupy space for NULL values
§ The total length of strings is defined when strings are given
Is array made up of number of data items?
Yes, that's the idea of an array.
Yes, that's the idea of an array.
Yes, that's the idea of an array.
Yes, that's the idea of an array.
How can you pause or break a C plus plus program running in DOS-BOX?
There is no pause function as such, but you can easily roll your own:
#include <iostream>
#include <limits>
void Pause()
{
std::cout << "Press ENTER to continue...";
std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );
}
int main()
{
Pause();
return( 0 );
}
What is c program of roman numbers?
There being only 7 symbols to consider (IVXLCDM), conversion is easily achieved in any number of ways. In general, numerals are formed from left to right, largest value to smallest. However, if a smaller value precedes a larger value, the smaller value is subtracted from the larger value (or is negated). This can lead to problems such as IVX. Reading left to right this would become 10 - ( 5 - 1 ) = 10 - 4 = 6. There's nothing wrong with this, but most people would accept 6 = VI, not IVX.
The problem is there has never been an official standard relating to how Roman numerals are formed. Decimal 1999 could be represented as MCMXCIX or MIM or MDCCCCLXXXXVIIII or even a mixed format like MCMXCVIIII. All are intrinsically correct. However, only the first example conforms to what many would consider to be the "unofficial" standard, whereby certain combinations are no longer permitted (such as IIII, IM and VX).
This standard has been incorporated into the following code.
#include <iostream>
using namespace std;
int main()
{
char roman[11];
int decimal[10];
memset( roman, 0, 11 );
memset( decimal, 0, 10 * sizeof( int ));
cout << endl;
cout << "Enter a Roman number (max. 10 chars from I, V, X, L, C, D or M): ";
cin.getline( roman, 11, '\n' );
strupr( roman ); // convert to uppercase for consistency
// check validity, including all invalid combinations
if( !strlen( roman )
( strspn( roman, "IVXLCDM") != strlen( roman ))
( strstr( roman, "IIII" ))
( strstr( roman, "XXXX" ))
( strstr( roman, "CCCC" ))
( strstr( roman, "MMMM"))
( strstr( roman, "IL" ))
( strstr( roman, "IC" ))
( strstr( roman, "ID" ))
( strstr( roman, "IM" ))
( strstr( roman, "XD" ))
( strstr( roman, "XM" ))
( strstr( roman, "VX" ))
( strstr( roman, "VL" ))
( strstr( roman, "VC" ))
( strstr( roman, "VD" ))
( strstr( roman, "VM" ))
( strstr( roman, "LC" ))
( strstr( roman, "LD" ))
( strstr( roman, "LM" ))
( strstr( roman, "DM" ))
( strstr( roman, "IIV" ))
( strstr( roman, "IIX" ))
( strstr( roman, "XXL" ))
( strstr( roman, "XXC" ))
( strstr( roman, "CCD" ))
( strstr( roman, "CCM" )))
{
cout << roman << " is not a valid roman number." << endl;
return( -1 );
}
// convert to decimal, in reverse order.
int c = 9, total = 0;
while( c >= 0 )
{
switch( roman[c] )
{
case('I'): decimal[c] = 1; break;
case('V'): decimal[c] = 5; break;
case('X'): decimal[c] = 10; break;
case('L'): decimal[c] = 50; break;
case('C'): decimal[c] = 100; break;
case('D'): decimal[c] = 500; break;
case('M'): decimal[c] = 1000; break;
}
if( c < 9 ) // subtraction required?
if( decimal[c] < decimal[c+1] )
decimal[c] *= (-1); // negate
// update total.
total += decimal[c--];
}
cout << "Roman " << roman << " is decimal " << total << endl;
return( 0 );
}
What do you mean by operator precedence and associativity?
Calculate y in the following equation: y = 2 + 3 x 4 What answer did you get? Did you get 20? If you did, you messed up. You should have gotten 14. If you got 20, you did the operations in the order in which they appear, from left to right, which is a mistake. You added 2 and 3, to get 5, and then you multiplied by 4, to get 20. But you should have multiplied 3 by 4, first, to get 12, and added that product to 2, to get 14. That's because multiplication (and division) take precedent over addition (and subtraction). Now, try this: y = (2 + 3) x 4 Did you get 20? If so, you got the right answer. Do you know why?
Prime number program in C using recursion?
//Program to check number is prime or not using recursive function
#include<stdio.h>
#include<stdlib.h>
void prime(int num,int count)
{
if(count<num)
{
if(num%count==0)
{
printf("%d is not Prime Number\n",num);
goto exit;
}
count += 1;
if(count<num)
{
prime(num,count);
}
}
if(num==count)
{
printf("%d is a Prime Number\n",num);
}
exit:
return 0;
}
int main()
{
system("cls");
int gvar;
printf("Enter the number = ");
scanf("%d",&gvar);
prime(gvar,2);
printf("\nashokakhil@gmail.com\n");
system("PAUSE");
return 0;
}
I think this can be another solution
#include<stdio.h>
#include<conio.h>
int prime(int);
main()
{
int i=1,r;
clrscr();
r=prime(i);
if(r==1)
printf("\n\n\tNo is prime ");
getch();
}
int prime(int i)
{
int n=1,ans,flag=1;
i++;
ans=n%i;
if(ans==0)
{
printf("\t\t\n\nNo is not prime");
flag=0;
return flag;
}
if((i!=n-1)&&(n!=1))
flag=prime(i);
return flag;
}
Write a program that input a positive integer and prints a triangle using for loop?
write a program that reads in the size of the side of square and then pints a hollow square of that size out of asterisks and blanks?