How do you convert binary into decimal and vice versa?
Binary to Decimal
Working from the least-significant bit, the positional values are 1, 2, 4, 8, 16, 32, 64 and 128 (each more significant bit doubles the value of the preceding bit). If the corresponding bit is set, add that value to an accumulator initialised to zero.
Decimal to Binary
Repeatedly divide the decimal value by 2 and take the remainder (which can only be 0 or 1). Each division determines the value of the next most significant bit, starting with the least significant bit.
I think you mean operation overlord??? It is the American, Canadian and British offensive on Europe in World War 2. They landed in Normandy on 6th June 1944 (Commonly called D-Day, Day of Days or Deliverance Day) and progressed throughout France liberating Paris on the 25th August. This allowed the allies a foothold in Europe.
Program to concatenate the two strings without using build in functions?
#include<iostream>
#include<string>
int main()
{
using std::string;
string a = "hand";
string b = "bag";
string c = a + b; // concatenation
}
What kind of information is represented by a pointer variable?
It is variable. On most PCs it is either 32 or 64 bits. But it can be smaller on other systems. To find the size use sizeof(void*) .
HISTORY of Turbo C C stands for COMBINED PROGRAMMING LANGUAGE. Sometimes called SYSTEM PROGRAMMING LANGUAGE or SPL. C parallels with UNIX in 1969, by Bell Laboratories that sought an alternative to the Multics operating system for PDP-7 computer. The original version of Multics operating system was written in assembly language.
The reason why the language is called C is that it is the successor to the language called B which was developed by Ken Thompson in 1970 while working on DEC PDP-7. B was the successor the language called BCPL (Basic Combined Programming Language) which was developed by Martin Richards.
The C Language was designed in 1972 by Dennis Ritchie and first implemented at Bell Laboratory using DEC PDP-11 computer.
In 1978 Brian Kernighan and Dennis Ritchie wrote the famous book called THE C PROGRAMMING LANGUAGE.
C is often called a Middle Level Language but has a functionalism of a high-level language and assembly language. C has only 32 keywords (27 from Kernighan and Ritchie standard and 5 added by the ANSI Standardization committee).
Programming is a series of individual instructions to the computer that collectively perform a meaningful task. It is the act of writing or coding computer instructions.
Program Source Code is the finished encoded instructions.
Programmer is the one who write the computer program and the first lady programmer is Lady Augusta "Ada" Byron.
Translator is use to transform the source code into a machine language that the computer can understand.
Linker is use to adjust the translated source file so that the program will run. Linking is usually distinct from the compiling process on a machine running MS-DOS.
What is the definition of 'getch' in c programming?
what is getch()and their use
Function getch waits for a single keypress (without line-buffering and echoing).
In: ncruses.h (unix) or conio.h (dos).
Display numbers from 1 to 10 using for loop?
the following is C code, should work well enough. If not, you should get the general idea.
int counter;
for (int i=1;i<10;i++)
{
println("Enter a number: ");
cin << counter;
}
println("Total, %i", counter);
Difference between integer array and character array?
Arrays are basic structures wherein one or more elements exist "side by side" and are of the same "type". An "integer" array is an array whose elements are all of an integer type which has no fractional component. A "character" array is an array which contains nothing but character types. A "floating point" array contains elements that have both an integer and fractional portion.
Simply put, they are arrays of particular types.
Language Lab is essential for teaching Foreign Languages in Modern Teaching Methods. The system helps to teach any langauge very easily.
1). Professor can communicate simultaneously, with all the students or indivisual student.
2). Indivisual student can discuss with the professor through a call request switch. Call will be registered in the professor's main console.
3). Professor can transmit his views to an individual student or to all the students.
4). Professor can monitor or listen to any student indivisually.
5). Prerecorded Cassette can be broadcasted to an indivisual student or to all.
6). Professor can record his/her voice or pronunciation.
8). For more convenience can be wireless system can be attached to the system, so that the Professor can move freely while teaching.
Definition of merge sort in data structure?
we can sort unordered list to order list. we fallow a mechanism given list divided into two parts take one-one part ordered them
How do you append an item into an array using c?
It is possible, if it is a dynamically allocated array:
int n= 0; Elem *p= NULL;
...
AddElem (Elem newval)
{
n += 1; p = (Elem *)realloc (p, n*sizeof (Elem));
p[n-1] = newval;
}
How t write Recursive C program to find Binomial coefficient?
#include<stdio.h>
int fact(int);
void main()
{
int n,r,f;
printf("enter value for n & r\n");
scanf("%d%d",&n,&r);
if(n<r)
printf("invalid input");
else
f=fact(n)/(fact(n-r)*fact(r));
printf("binomial coefficient=%d",f);
}
int fact(int x)
{
if(x>1)
return x*fact(x-1);
else
return 1;
}
There are some difficulties that a programmer must overcome in writing an operating system . Following are the difficulties
Which type of data refers to things that can be counted?
A quantitative variable is numeric and therefore can be counted discretely or continuously. The other side of the spectrum is qualitative variables.
What is primitive and non primitive cell?
Primitive unit cells use every lattice point as a unit cell vertex.
Non-primitive unit cells, however, contain extra lattice points not at the corners.
How do you add 2 numbers with register machine assembly language?
.model small
.stack
.data
.code
main proc
mov al,10
mov bl,15
add al, bl
start:
mov cx,8
mov bl,'1'
test bl,10000000b
mov ah,09h
int 21h
next:
shl bl,1
mov dl,1
mov ah,09h
int 21h
mov ah,4ch
int 21h
main endp
end start
end
What does call-by-Value and call-by-Reference mean?
When we swap values in function, that time "Call by value" swaps copied value not the exact values. so it doesn't reflect on main function. But in case of "Call by
reference", we swap actual value which is available at that reference or address.
Is c plus plus is pure object oriented?
No. C is not object-oriented, it is a procedural language.
C++, while object-oriented, is not purelyobject-oriented. One of the requirements for a pure object-oriented language is that everything is an object. C++ still has primitive data types (int, long, double, etc.), and so is not purely object-oriented.
What is a linked list used for?
A linked list is used in computer science to store data as a series of related nodes. Linked lists are used as the basis for abstract data types when programming. The chief advantage of a linked list is that data can be added or removed from the list without having to reorganize the whole list. A drawback to linked lists can be that it is difficult to sort, organize, or recall specific information from the list.
Time complexity of selection sort?
Merge sort (or mergesort) is an algorithm. Algorithms do not have running times since running times are determined by the algorithm's performance/complexity, the programming language used to implement the algorithm and the hardware the implementation is executed upon. When we speak of algorithm running times we are actually referring to the algorithm's performance/complexity, which is typically notated using Big O notation.
Mergesort has a worst, best and average case performance of O(n log n). The natural variant which exploits already-sorted runs has a best case performance of O(n). The worst case space complexity is O(n) auxiliary.
The programming language C is an enhanced version of the programming language C?
Yes, the C++ programming language is an enhanced version of the C programming language.
Of note: to increment a variable by 1 in C, you could type myInt++ (i.e. for(int i = 0; i < 1; i++). C++ was named C++ because it is one step above C (C + 1).
Write a program WAP to print a given integer in the reverse order?
int n; // the number you want to reverse
int rev_n = 0;
while (n > 0) {
// shift rev_n digits left
rev_n *= 10;
// put rightmost digit of n onto right of rev_n
rev_n += n % 10;
// remove rightmost digit of n
n /= 10;
}