If m and n are int type variables, what will be the result of the expression
m% n when m=5 and n=2 ?
A) 0
B) 1
C) 2
D) None of the above

1 Answer

Answer :

B) 1

Related questions

Description : What will be the values of x, m and n after execution of the following statements? Int x, m, n; m=10; n=15; x= ++m + n++; A) x=25, m=10, n=15 B) x=27, m=10, n=15 C) x=26, m=11, n=16 D) x=27, m=11, n=16

Last Answer : C) x=26, m=11, n=16

Description : Let P(m,n) be the statement m divides n where the Universe of discourse for both the variables is the set of positive integers. Determine the truth values of the following propositions. (a) ∃m ∀n P(m,n) (b) ∀n P(1,n) ( ... -False (C) (a)-False; (b)-False; (c)-False (D) (a)-True; (b)-True; (c)-True

Last Answer : Answer: A

Description : A horn clause is ...................... (A) A clause in which no variables occur in the expression (B) A clause that has at least one negative literal (C) A disjunction of a number of literals (D) A clause that has at most one positive literal

Last Answer : (D) A clause that has at most one positive literal 

Description : What is the value returned by the function f given below when n = 100 ? int f(int n)  { if (n==0) then return n;  else return n + f(n-2);  } (A) 2550 (B) 2556 (C) 5220 (D) 5520

Last Answer : (A) 2550

Description : What is the result of the expression (1&2)+(3/4) ? (A) 1 (B) 2 (C) 3 (D) 0

Last Answer : (D) 0

Description : Which of the following has compilation error in C ? (A) int n = 32; (B) char ch = 65; (C) float f= (float) 3.2; (D) none of the above

Last Answer : D

Description : Let L be the language generated by regular expression 0*10* and accepted by the deterministic finite automata M. Consider the relation RM defined by M. As all states are reachable from the start state, RM has ................ equivalence classes. (A) 2 (B) 4 (C) 5 (D) 6

Last Answer : (D) 6

Description : What does the following expression means ? char *(*(* a[N]) ( )) ( ); (A) a pointer to a function returning array of n pointers to function returning character pointers. (B) a ... to characters (D) an array of n pointers to function returning pointers to functions returning pointers to characters.

Last Answer : Answer: A,B,C,D

Description : The correct way to round off a floating number x to an integer value is (A) y = (int)(x+0.5) (B) y = int(x+0.5) (C) y = (int)x+0.5 (D) y = (int)((int)x+0.5)

Last Answer : (A) y = (int)(x+0.5)

Description : When the following code is executed what will be the value of x and y? int x = 1, y=0; y = x++; (A) 2, 1 (B) 2, 2 (C) 1, 1 (D) 1, 2

Last Answer : (A) 2, 1

Description : A three dimensional array in C' is declared as int A[x][y][z]. Here, the address of an item at the location A[p][q][r] can be computed as follows (where w is the word length of an integer): (A) &A[0][0][0]+w(y*z*q+z*p+r) (B) &A ... *q+r) (C) &A[0][0][0]+w(x*y*p+z*q+r) (D) &A[0][0][0]+w(x*y*q+z*p+r)

Last Answer : Answer: B

Description : The Servlet Response interface enables a servlet to formulate a response for a client using the method ............... (A) void log(Exception e, String s) (B) void destroy() (C) int getServerPort() (D) void setContextType(String Type)

Last Answer : (D) void setContextType(String Type)

Description : A structure brings together a group of A) items of the same data type B) related data items and variables C) integers with user defined names D) floating points with user defined names

Last Answer : B) related data items and variables

Description : Given that x=7.5, j=-1.0, n=1.0, m=2.0 the value of --x+j == x>n>=m is: (A) 0 (B) 1 (C) 2 (D) 3

Last Answer : (A) 0 

Description : How many times does the following code segment execute int x=1, y=10, z=1; do{y--; x++; y-=2; y=z; z++} while (y>1 && z

Last Answer : A) 1

Description : main() { Int a=3, b=2, c*d*e; d=&a; e=&b; c=*d+*e; } Which one of the given answers is correct? A) a=4, c-6 B) a=3, c=5 C) a=3, c=6 D) a=3, c=8

Last Answer : B) a=3, c=5

Description : int[ ] ={5,6,7,8,9} What is the value of a[3]? A) 9 B) 8 C) 7 D) 6

Last Answer : B) 8

Description : Assuming there are n keys and each keys is in the range [0, m-1]. The run time of bucket sort is (A) O(n) (B) O(n lgn) (C) O(n lgm) (D) O(n+m)

Last Answer : (D) O(n+m)

Description : A method name myMethod( ) that needs two integer arguments is declared as A) public void myMethod( ); B) public void myMethod(int a, int b); C) public void myMethod(int a, b); D) public int myMethod(a, b);

Last Answer : B) public void myMethod(int a, int

Description : If an integer occupies 4 bytes and a character occupies 1 byte of memory, each element of the following structure would occupy how many bytes ? struct name { int age; char name[30]; }; A) 30 B) 32 C) 34 D) 36

Last Answer : C) 34

Description : Assume that variable x resides at memory location 1234, y at 1111 and p at 2222. Int x=1, y=2, *p; p=&x; y=*p; What will be the value of y after execution of above code? A) 2 B) 1 C) 1234 D) 1111

Last Answer : C) 1234

Description : Trace the error: void main( ) { int *b, &a; *b = 20 printf(“%d, %d”, a, *b) } (A) No error (B) Logical error (C) Syntax error (D) Semantic error

Last Answer : (C) Syntax error

Description : What will be the output of the following segment of the program? main( ) { char *s = “hello world”; int i = 7; printf(“%, *s”, i, s); } (A) Syntax error (B) hello w (C) hello (D) o world

Last Answer : Answer: Marks given to all

Description : What does the following declaration mean ? int (*ptr) [10]; (A) ptr is an array of pointers of 10 integers. (B) ptr is a pointer to an array of 10 integers. (C) ptr is an array of 10 integers. (D) none of the above.

Last Answer : (B) ptr is a pointer to an array of 10 integers.

Description : What will be the output of the following ‘C’ code ? main ( ) { int x = 128; printf (“\n%d”, 1 + x++); } (A) 128 (B) 129 (C) 130 (D) 131

Last Answer :  (B) 129

Description : Consider the following JAVA program: public class First { public static int CBSE (int x) { if (x < 100) x = CBSE (x +10); return (x - 1); } public static void main (String[] args){ System.out.print(First.CBSE(60)); } } What does this program print? (1) 59 (2) 95 (3) 69 (4) 99

Last Answer : (2) 95 

Description : Using which keyword we can access value of the instance variables and class variables of that class inside the method of that class itself. A) super B) final C) this D) either super or this

Last Answer : C) this

Description : State true or false for Java Program. i) All class variables are instance variables ii) All protected methods are friendly methods A) i-false, ii-false B) i-false, ii-true

Last Answer : B) i-false, ii-true

Description : In Java variables, if first increment of the variable takes place and then the assignment occurs. This operation is also called ............................. . A) pre increment B) post increment C) incrementation D) pre incrementation

Last Answer : A) pre increment

Description : State True or False. i) A satic function can have access to only other static members (functions or variables) declared in the same class. ii) A static member function can be called using the class name (instead of its objects) A) True, True B) True, False C) False, True D) False, False

Last Answer : B) True, False

Description : Some of the situations where inline expansion may not work are: A) For functions returning values, if a loop, a switch or goto exists. B) If functions contain static variables and they are re-cursive. C) For functions not returning values, if return statement exist. D) All of the above.

Last Answer : D) All of the above.

Description : …………. Refer to the names of variables, functions, arrays, classes etc. created by the programmer. A) Keywords B) Identifiers C) Constraints D) Strings

Last Answer : B) Identifiers

Description : Which of the following is FALSE in C? A) Keywords can be used as variable names B) Variable names can contain a digit C) Variable names do not contain a blank space D) Capital letters can be used in variables

Last Answer : A) Keywords can be used as variable names

Description : .............. predicate calculus allows quantified variables to refer to objects in the domain of discourse and not to predicates or functions. (A) Zero-order (B) First-order (C) Second-order (D) High-order

Last Answer : (B) First-order

Description : Which one of the following describes the syntax of prolog program ? I. Rules and facts are terminated by full stop (.) II. Rules and facts are terminated by semicolon (;) III. Variables names must start with upper case alphabets. ... alphabets. Codes : (A) I, II (B) III, IV (C) I, III (D) II, IV

Last Answer : (C) I, III

Description : Let Pi and Pj be two processes, R be the set of variables read from memory, and W be the set of variables written to memory. For the concurrent execution of two processes Pi and Pj, which of the following conditions is not true? (A) R(Pi)∩W(Pj)=Φ (B) W(Pi)∩R(Pj)=Φ (C) R(Pi)∩R(Pj)=Φ (D) W(Pi)∩W(Pj)=Φ

Last Answer : (C) R(Pi)∩R(Pj)=Φ 

Description : In constraint satisfaction problem, constraints can be stated as . (A) Arithmatic equations and inequalities that bind the values of variables (B) Arithmatic equations and inequalities ... impose restrictions over variables (D) Arithmatic equations that discard constraints over the given variables

Last Answer : (A) Arithmatic equations and inequalities that bind the values of variables

Description : Match the following types of variables with the corresponding programming languages: (a) Static variables (i) Local variables in Pascal (b) Stack dynamic (ii) All variables in APL (c) Explicit heap dynamic (iii) Fortran 77 (d) Implicit ... (ii) (C) (iii) (i) (iv) (ii) (D) (ii) (i) (iii) (iv)

Last Answer : (C) (iii) (i) (iv) (ii) 

Description : For a program of k variables, boundary value analysis yields .............. test cases. (A) 4k – 1 (B) 4k (C) 4k + 1 (D) 2k – 1

Last Answer : (C) 4k + 1

Description : In Artificial Intelligence (AI), what is present in the planning graph? (1) Sequence of levels (2) Literals (3) Variables (4) Heuristic estimates

Last Answer : Sequence of levels

Description : A Boolean operator Ө is defined as follows: 1Ө1=1, 1Ө0=0, 0Ө1=0 and 0Ө0=1 What will be the truth value of the expression (xӨy)Өz = xӨ(yӨz)? (A) Always false (B) Always true (C) Sometimes true (D) True when x, y, z are all true

Last Answer : (B) Always true

Description : The regular expression corresponding to the language L where L={x∈{0,1}* | x ends with 1 and does not contain substring 00 } is: (A) (1 + 01)* (10 + 01) (B) (1 + 01)* 01 (C) (1 + 01)* (1 + 01) (D) (10 + 01)* 01

Last Answer : (C) (1 + 01)* (1 + 01) 

Description : The number of strings of length 4 that are generated by the regular expression (0|∈) 1+2* (3|∈), where | is an alternation character, {+, *} are quantification characters, and ∈ is the null string, is: (A) 08 (B) 10 (C) 11 (D) 12

Last Answer : (D) 12

Description : The number of strings of length 4 that are generated by the regular expression (0+1 +|2+3 + )*, where | is an alternation character and {+, *} are quantification characters, is: (A) 08 (B) 09 (C) 10 (D) 12

Last Answer : (C) 10

Description : In java, ............. can only test for equality, where as ............ can evaluate any type of the Boolean expression. A) switch, if B) if, switch C) if, break D) continue, if

Last Answer : A) switch, if

Description : Consider the following ER diagram:  The minimum number of tables required to represent M, N, P, R1, R2 is (A) 2 (B) 3 (C) 4 (D) 5

Last Answer : (A) 2