Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Write a program to read in a positive integer and check whether it is prime or not?
/* Program to check whether a given number is prime or not*/]
# include
void main()
{
int i=2,n,flag=1;
clrscr();
printf("\nEnter the number : ");
scanf("%d",&n);
while(i { if(n%i==0) { flag=0; printf("\n%d is not a prime number",n); break; /*takes control out of the while as soon as the numbers is fully divisible */ } else i++; }
if(n%i==0)
flag=0;
printf("\n%d is not a prime number",n);
break; /*takes control out of the while as soon as the numbers is fully divisible */
}
else i++;
Q. (192.8)10 - (AE.E)16 = (X)8, Find value of x. Use 8's complement method. Q. Write first 10 numbers in the base 4. Q. Explain Error-Detection code & Error-correction code w
Optimal Page Replacement Algorithm The optimal page replacement algorithm that as well known as OPT is an algorithm which works as follows: while a page needs to be swapped in,
Q. For function F(x,y,z) = ∑m (1,2,3,5,6) using TRUTH TABLE only 1. Find POS expression 2. Implement this simplified expression using two level OR-to-AND gate network 3. I
Explain the Structure of a C Program? Each C program consists of one or more functions one of the which must be main(). A function name is forever followed by a pair of parenth
Q. Explain Open-systems interconnections architecture model The most common network architecture model is the open-systems interconnections (OSI). Figure shows the ISO (Intern
Explain Protection mechanism. Protection mechanism: The subsequent mechanisms are commonly utilized for protecting files having programs and data. (a) Access controls list
Encapsulation of OOA Encapsulation separates the interface of an abstraction from its implementation. By taking the above example i.e. of a car, we can now categorize them as:
Why the temporary registers W and Z are named so I mean we start from A,B,C,D,E then H and L coz H stands for higher bit nd L for lower bit of the address pointed by memory pointer
Q. What are common reason for error massages while copying file? While copying files with copy, DOS in encounters any error, it displays a suitable error massage. The common re
Define underflow and overflow. Underflow: If the result the arithmetic operation including n-bit numbers is too small to show by n-bits, underflow is said to occur. Overflow
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd