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++;
Give difference between top down parsing and bottom up parsing. Top down parsing: Specified an input string, top down parsing tries to derive a string identical to this by s
Abstract class: Abstract classes are the class where one or more methods are abstract but not essentially all method has to be abstract. Abstract methods are the methods, which are
Explain any three parsing techniques. Following are three parsing techniques: Top-down parsing: This parsing can be viewed as an attempt to get left-most derivations of an
Explain File scope File scope: The variables and functions with file scope appear outside any block or list of parameters and are accessible from any place in the translation
A Padovan string P(n) for a natural number n is defined as: P(0) = ‘X’ P(1) = ‘Y’ P(2) = ‘Z’ P(n) = P(n-2) + P(n-3), n>2 where + denotes string concatenation. For a string of t
What types of data entry services do you perform? Our business is to understand what data you require entered and in what particular format. After an initial analysis is perfor
Explain briefly Common sub expression elimination of the commonly used code optimization techniques. Common sub expression elimination: In given expression as "(a+b)-(
Zero address instruction format is used for (A) RISC architecture. (B) CISC architecture. (C) Von-Neuman architecture. (D) Stack-organized architecture.
Design a mod-12 Synchronous up counter. Ans. Design of a mod 12 synchronous counter by using D-flipflops. I state table Present state Next
Q. Show the Bus and Memory Transfers? A digital computer has many registers and rather than connecting wires amid all registers to transfer information between them a common bu
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