Write a c program to check Armstrong number using functions?
TO PRINT ALPHABET PYRAMID
ABCDEFGGFEDCBA
ABCDEFFEDCBA
ABCDEEDCBA
ABCDDCBA
ABCCBA
ABAB
A
#include
#incldue
int main( )
{
int r,c,askey,sp;
clrscr( );
for( r=7; r>=1; r-- )
{
for(sp=6; sp>=r; sp--)
printf(" "); //2 spaces
askey=65;
for(c=1; c<=r; c++ )
printf("%2c", askey++ );
for(c=r-1; c>=1; c-- )
printf("%2c", --askey);
printf("\n");
}
getch();
return 0;
}
by BRAMHA VARDHAN
What are your accomplishments over the last three months?
Ability to work in Nhs , in the acute settings
A chess timer or time clock is a device with two timing clocks side by side, one for each player. There is a button or plunger on the top of each timer. When one of the buttons or plungers is pressed, that timer stops running and automatically starts the other timer running. Depending on the situation or agreement between the players, the time period may vary. Its purpose is to either force players to make a minimum number of moves within a particular period of time or to make any type of move before the time runs out while it is that player's move. In official tournament matches the clocks are set for two and a half hours each with the requirement that each player must make at least 40 moves within that time. After that time, the game may go on with no further time restraints. In non-official games, the players may agree to any time period as they choose. For example, a "Blitz" game is usually 5 minutes long, but the purpose of the time period is not to force a certain number of moves within that time. A Blitz game is a kind of Musical Chairs on the chess board. If a player's time runs out while it is his/her move, that player loses. In informal games, the players may agree on any period of time. Many players love Blitz games for the rush of action that occurs as each player moves pieces almost by instinct rather than carefully thought out strategies There simply is no time for too much thought. There are two types of clocks. One is where the clock simply stops when the player presses the button/plunger. The other type is where the clock stops but backs up about 3 seconds. This is to compensate for the time it takes the player to move his/her hand from the moved piece over to the timer to stop his/her clock.
What is the difference between struct and union in c file management?
The main difference is in how the data structures are stored. In a union, all of the elements are stored in one location. A structure stores each of its elements in a separate memory location.
What is mean by resident monitor?
A Resident monitor (1950s-1970s) was a piece of software that was an integral part of a general-use punch card computer.
additional ;
Its main function is to control transferring of Computer from one job to another job
When only a copy of the argument's value is passed into the paremeter variable?
By default, a copy of the argument's value is passed into the parameter variable. This is "call by value" semantics, and the called function can do whatever it wants with the parameter, but it cannot alter the original copy. Sometimes, in C and C++, you can pass the address of the value instead. This is "call by address" semantics, but the called function must be designed to handle it - in this case, the called function can alter the original value. (Actually, it is always "call by value" - what we call "call by address" is simply passing the value of the address, a subtle distinction which is important to understanding the language.)
Program to count the number of characters and words in the line?
in linux
wc -l filename
will count the lines
and
wc
will count the letters
How do you enter ASCII characters?
You type it. - in a way that is correct, but perhaps not over helpful.
ASCII = American Standard Code for Information Interchange. Over the life of computers, there have been several standards for encoding letters and numbers into binary strings ('0' and '1'). Early computers only had 4 bits for each character, this has slowly increased to the current 8 bits per character. Each standard has a name, ASCII is the name for the arrangement most commonly used today.
Though that is not quite accurate, first there are two ASCII codes, there is 7-bit ASCII and there is 8-bit ASCII, both with the same name. Also, most people use Microsoft Windows, and Microsoft do not actually follow the ASCII standard completely, some of the characters in Windows are different to ASCII on other platforms. Hence a common name used of 'MS-ASCII' when network technicians need to define which they are using, or converting.
If you have a modern small computer (Desktop, Notebook etc with Windows, Linux or MAC) it uses ASCII already, you do not need to do anything to get it. If you happen to own an IBM mainframe then this uses EBCDIC coding which is different - but the system includes all the code needed to automatically convert files between the various codes for you.
What is RDBMS and its advantages?
Advantage is More secure and Normalization(reducing Redundancy,repitation,concurrency),avoiding problems while processing 2 things at a time.(while these are not possible in file proccessing systems)
Disadvantage is it requires more knowledge to implement.
What is the limitations of do while loop in c?
To repeatedly perform the logic inside the loop while the condition holds true (you would expect something inside the code block to eventually cause the test condition to evaluate as false).
Most basic examples given in text books use an incrementing variable which could also be implemented as a for loop:
int i = 0;
do {
i++;
} while (i < 100);
A better example would be:
bool door_opened;
do {
door_opened = ring_doorbell(); /* an example function*/
} while (door_opened == false);
PS its probably 10 years since I wrote any C so syntax might not be 100% accurate.
Difference between pseudocode and flowchart?
Pseudo code is a sentence-like representation of an piece of code.
A flowchart is a symbolic representation of code, using box shapes and arrows. http://wiki.answers.com/What_is_the_differences_between_Pseudocode_and_Flowchart#ixzz16xbjczkm
Which is more good to use for loop or while loop?
The main difference comes into picture when you use continue with them i.e. for and while.
In a while loop if continue is used before the increment of a variable is done it converts into a infinite loop.
i=1;
while(i<10)
{
/* do stuff */
if(i==6);
continue;
i++;
}
The above piece of code will turn into an infinite loop.
for(i=1;i<10;i++)
{
/* do stuff */
if(i==6);
continue;
}
In the above for loop the value of will be incremented once it attains the value 6.
Therefore it will not turn into a infinite loop.
Cheers.
astvansh> 'for' statement takes the start condition, stop condition, and the increment. 'while' statement just takes the stop condition.
One scenario (which i can think of) where while 'needs' to be used rather than a for, would be when the counter needs to be incremented/decremented conditionally...
string[] arr = {"a", "b", "b", "c"};
int i = 0;
while( i< 10)
{
// do something constructive
if(arr[i] == "b")
{
i = i + 2;
}
else
{
i++;
}
}
Cheers,
Ajeesh
Another main difference between the two: a 'for' loop is called a determinate loop, meaning that we usually use it when we know ahead of time how many iterations we want. The 'while' loop is an 'indeterminate' loop, because we usually use it in situations where we do not know the number of times the loop may iterate.
Difference between binary files and text files?
"ASCII file" refers to a "text" file that is readable by the naked eye (it only contains the letters a-z, numbers, carriage returns, and punctuation marks). Conversely, a binary fie is not readable by the naked eye (it contains the ASCII characters in addition to binary codes).
How do you Compile the C Programs in command prompt?
That would depend on the compiler you were using and the file(s) you were trying to compile. Differen compilers would have different ways to run them, so you would need to know the commands for your particular compiler, if it is capable of running from the command prompt.
Example of different project management software?
There are several sites where you can gain insight into the different project management software solutions available. Here are two that I've found to be helpful:
http://www.web-based-software.com/project-management/
http://online-project-management-review.toptenreviews.com/
I personally use @task and have been very happy with it, but you can choose for yourself. Here's the link to @task's site if you're interested - http://www.attask.com.
Explain process control block?
The Process Control Block acts as a library of information about the processes in a system. Specific information is stored in the process control block highlighting important information about each process.
Why stack pointer is 16- bit register?
Stack Pointer (SP)
stores the address of a memory location which is used as a stack.
What is the difference between high level language and machine language?
The difference between high level languages and machine languages are as follows: 1)Machine language uses binary numbers/codes but high level languages(HLL) use key words similar to English and are easier to write. 2)Machine Language is a Low level language and is machine dependant while HLLs are not.
A pointer is a programming language data type whose value refers directly to (or "points to") another value stored elsewhere in the computer memory using its address.