What is the expansion of conio.h?
Conio.h library in C implies a console version which encapsulates the common I/O functions.
Console input/output header
Programmers use pseudo-code to debug programs. Pseudo-code lays out the basic coding for the program before putting it into any specific programming language. That way, a programmer can be sure that all the necessary components are included, and that the program will run as expected.
How many numbers can be stored in a 4-byte integer system?
If all four bytes are being used for its value (i.e. this is an unsigned integer) then you have 8 * 4 = 32 bits, so your range is from 0 to 2^32 (4,294,967,296)
Remember, the size of various data types in C and C++ is architecture dependent. See limits.h (/usr/include/limits.h in Linux)
What is a Linker used for in computer programming?
Linking is the process of combining various pieces of code and data together to form a single executable that can be loaded in memory. Linking can be done at compile time, at load time (by loaders) and also at run time (by application programs)
The average the sum of the elements divided by the number of elements?
Yes,
average is the sum of elements divided by the number of elements
Exp:- x1=10,
x2=20,
x3=30,
x4=10.
then the average is 10+20+30+10
------------------
4
=> 17.5
Average = sum of total of element
----------------------------------
no. of elements
Tools used in studying Systems Analysis and Design?
System analysis and design processes do not normally involve the use of any programming language at all, but UML is frequently used as an abstract (graphical) language in the design process.
Is it necessary to initialize accumulator variables?
If it isn't, then you don't know for sure what value it will start at in some languages. Thus, your count will be wildly inaccurate. In other languages, it will just generate an error if you forget to initialize.
Two steps:
1. It is critical that variables be properly initialized.
2. Counter-variables are variables.
How many values can a method return in Java?
A method in java can declare only one return value and type at a time. For ex: a single method cannot have a code that returns a string in some cases and an integer in other cases. Java compiler does not let you do that. You can only have one return type for every method in java.
What is the format specifier use with the data type double in c language?
double would be %e, %f or %g (depending on the format you want), long int would be %ld or %lu (signed or unsigned), long double would be %Le, %Lf or %Lg.
When would you use a count controlled loop vs. a flag controlled loop?
Counter Loop:
Counter loop is a loop which executes statement up to a fixed number of time.
In GW FOR ... NEXT loop is used as counter loop.
Controlled Loop:
Controlled loop is used to extend the statements till a specific condition is satisfied. In GW WHILE ... WEND is used as controlled loop.
What is main function of printf in a C program?
The syntax for printf is:
int printf(const char *format, ...);
Simple usage examples:
1. Print character literal: printf("%c", 'a');
2. Print character variable: printf("%c", my_char);
3. Print string literal: printf("%s", "hello world");
4. Print string variable: printf("%s", my_string);
5. Print integer variable: printf("%d", my_integer);
6. Print floating-point variable: printf("%f", my_float);
What is recursive algorithm to find the height of a binary search tree with n numbers of nodes?
Really the best way to traverse any binary tree is recursion. In this case we are going to be some node defined as having 3 values, a pointer to a left node, a pointer to a right node, and a value.
then in psudocode we can do it as:
int height(node n, int depth){
int leftDepth;
int rightDepth;
if(n.left != NULL)
leftDepth = height(n.left, depth+1)
else
leftDepth = depth;
if(n.right != NULL)
rightDepth = height(n.right, depth+1)
else
rightDepth = depth;
if(leftDepth > rightDepth) return leftDepth;
return rightDepth;
}
Essentially what you are doing is calling the algorithm on both the left and right nodes which in turn will call it on their left and right nodes, down to where all the nodes are null. Then what is returned is the greater depth of the two; because it will traverse before returning a depth, and only traverses if there is a deeper node, it will return the depth of the deepest node, or the height of the binary tree.
Difference between data and program?
well program is a set of instructions that are given to computer to perform perticular task as we want.
And data is any information that is stored in computer hard disc. it can not make any control on computer of computer related process.
What do you understand by complexity of sorting algorithms?
By understanding the time and space complexities of sorting algorithms, you will better understand how a particular algorithm will scale with increased data to sort.
* Bubble sort is O(N2). The number of Ops should come out <= 512 * 512 = 262144 * Quicksort is O(2N log N) on the average but can degenerate to (N2)/2 in the worst case (try the ordered data set on quicksort). Quicksort is recursive and needs a lot of stack space. * Shell sort (named for Mr. Shell) is less than O(N4/3) for this implementation. Shell sort is iterative and doesn't require much extra memory. * Merge sort is O( N log N) for all data sets, so while it is slower than the best case for quicksort, it doesn't have degenerate cases. It needs additional storage equal to the size of the input array and it is recursive so it needs stack space. * Heap sort is guaranteed to be O(N log N), doesn't degenerate like quicksort and doesn't use extra memory like mergesort, but its implementation has more operations so on average its not as good as quicksort.
Must a computer algorithm contain a loop?
No. An algorithm is a procedure or formula for solving a problem: a finite series of computation steps to produce a result. Some algorithms require one or more loops, but it is not true that every algorithm requires a loop.
Why calculations in computer systems are performed in binary and not ASCII?
Everything has to be binary encoded since it's the only language natively understood by a binary computer. Even ASCII character codes must be binary encoded. However, it's not clear how you would use ASCII to perform a calculation since the American Standard Code for Information Interchange is a character encoding scheme that maps 7-bit binary codes to glyph bitmaps according to the current ASCII code page. You can certainly use the encodings in calculations, but not the characters themselves, because the digits '0' through '9' in the ASCII table do not map to the values 0 through 9. In order to translate an ASCII digit to the value it represents, you first have to subtract 48 from the ASCII character value. From the computer's perspective, determining the actual value represented by the character '7' requires the binary calculation 00110111 - 00110000 = 00001110. In hexadecimal, this equates to 0x37 - 0x30 = 0x07, because 0x37 maps to character '7' in the ASCII table, while 0x30 maps to '0'. Thus you could also say '7' - '0' = 7.
What is low level programing languages?
The programs written in Machine codes (like hexadecimal codes) are the Low level programs. These are understood only by the Microprocessor they are written for and written on.
Whereas the High level programs are written in English like languages which are human redable.
How to save output in separate file for c programs?
You can have more than one output-file opened in the same time, see manuals of functions fopen, fclose, fwrite, fprintf, ...
City networks are commonly known as WAN's, or Wide Area Network's.
you find his ip address and you type this in your command prompt window.. format *.*
it will format his hard drive, make his monitor catch fire, and his computer will start laughing at him in a evil Satan voice
seriously thou... DONT DO THAT.. its a joke
you don't destroy a hacker, you just protect yourself from one.. its called a firewall or antivirus
Thousands! Programming languages number in the thousands, from general purpose programming languages such as C++, Java, and others, to special purpose languages which are used in one application. They can be ordered by type (structured, object-oriented, functional, etc.) or by history, or syntax. See the related list of programming languages.
A program in c that identifies the longest word in a sentence?
#include<stdio.h>
#include<string.h>
#include<conio.h>
void main()
{
int i,max=0,count=0,j;
char str[100]; /* ={"INDIA IS DEMOCRATIC COUNTRY"}; u can use a string inside,in place of user input */
printf("\nEnter the string\n:");
gets(str);
for(i=0;i<strlen(str);i++)
{
if(!(str[i]==32))
{
count++;
}
else
{
if(max<count)
{
j=i-count;
max=count;
}
count=0;
}
}
for(i=j;i<(j+max);i++)
printf("%c",str[i]);
getch();
}
When was the fifth generation programming language developed?
The only decent attempt at a 5th generation programming language was done by japan in the 90's and it was based on prolog. It was deemed too slow and inefficient to be of viable use, and as such there has been no marketable 5gl to date, so the question would have been better posed as 'Is there a fifth generation programming language?' - also note that the idea of 5gl is just that, an idea. Even if we succeed in creating a 5gl, it will be 'A' 5gl language, not 'THE' 5gl language
What is the difference between integer and floating point data?
Actually float and double are both numeric data types that are used to store large numbers. They can have a lot of digits after the decimal point in the number. The actual difference between them is in size. According to the Java Language Specification, a float is a 32-bit value, while a double is a 64-bit value. Otherwise they work in the same way with respect to one another.