What is the difference between length() and length?

1 Answer

Answer :

A: length() function is used to find the number of characters present in a String, whereas, length keyword is used to find the number if cells in an array.

Related questions

Description : Which of the following methods belong to the string class? A) length( ) B) compare To ( ) C) equals ( ) D) All of them

Last Answer : D) All of them

Description : Which of the following methods belong to the string class? A) length( ) B) compare To ( ) C) equals ( ) D) All of them

Last Answer : D) All of them

Description : The …………….. policy segments the disks request queue into sub queues of the length N. A) SCAN B) C-SCAN C) N-Step SCAN D) FSCAN

Last Answer : C) N-Step SCAN

Description : A simple cabling method, known as the ……………… topology allows about 30 computers on a maximum cable length of about 600 feet. A) Ring B) Bus C) Star D) Mesh

Last Answer : B) Bus

Description : ………………….. implies that all subnets obtained from the same subnet mask. A) Static subnetting B) Dynamic subnetting C) Variable length subnetting D) Both B and C

Last Answer : A) Static subnetting

Description : ........ implies that all subnets obtained from the same network use the subnet mask. A) Static subnetting B) Dynamic Subnetting C) Variable length subnetting D) Both B and C

Last Answer : A) Static subnetting

Description : A data file of 1,00,000 characters contains only the characters g-l, with the frequencies as indicated in table:  using the variable-length code by Huffman codes, the file can be encoded with (A) 2,52,000 bits (B) 2,64,000 bits (C) 2,46,000 bits (D) 2,24,000 bits

Last Answer : (D) 2,24,000 bits 

Description : While estimating the cost of software, Lines of Code (LOC) and Function Points (FP) are used to measure which one of the following? (A) Length of code (B) Size of software (C) Functionality of software (D) None of the above

Last Answer : (B) Size of software

Description : The longest common subsequence of the sequences X= and Y= has length (A) 2 (B) 3 (C) 4 (D) 5

Last Answer : (C) 4

Description : Consider a code with five valid code words of length ten : 0000000000, 0000011111, 1111100000, 1110000011, 1111111111 Hamming distance of the code is (A) 5 (B) 10 (C) 8 (D) 9

Last Answer : Answer: Marks to all

Description : What is the size of the 'total length' field in IPv 4 datagram ? (A) 4 bits (B) 8 bits (C) 16 bits (D) 32 bits

Last Answer : (C) 16 bits 

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 : Which of the following is used for the boundary representation of an image object? (A) Quad Tree (B) Projections (C) Run length coding (D) Chain codes

Last Answer : (D) Chain codes

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 IEEE-754 double-precision format to represent floating point numbers, has a length of ........... bits. (A) 16 (B) 32 (C) 48 (D) 64

Last Answer : (D) 64

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 : What is the probability that a randomly selected bit string of length 10 is a palindrome? (A) 1/64 (B) 1/32 (C) 1/8 (D) ¼

Last Answer : (B) 1/32

Description : Which of the following are not regular? (A) Strings of even number of a's. (B) Strings of a's, whose length is a prime number. (C) Set of all palindromes made up of a's and b's. (D) Strings of a's whose length is a ... ) (A), (B) and (C) only (3) (B), (C) and (D) only (4) (B) and (D) only

Last Answer : (B), (C) and (D) only

Description : The maximum size of the data that the application layer can pass on to the TCP layer below is ......... (1) 216 bytes (2) 216 bytes + TCP header length (3) 216 bytes - TCP header length (4) 215 bytes

Last Answer : Answer: Marks to all

Description : What is the difference between a sequential file and a random file?

Last Answer : Ans: Sequential file access is the method employed in tape drives where the files are access in a sequential manner. So if you have to get a file in the end of the tape you have to start ... Disks and Optical drives, wherever the files is placed it will go to that particular place and retrieve it.

Description : What is the difference between Call by value and Call by reference?

Last Answer : A: Call By Value : When a function is called by value, then the value of the actual parameter is copied to the formal parameter (i.e. a separate copy is made). Any changes made with the ... with the values at that address of the formal parameter affects (changes) the value of the actual parameter.

Description : What is the difference between naming conventions and naming rules?

Last Answer : A: Violating naming rules will result in a syntax error, whereas, violating naming conventions will not result in any error.

Description : What is the difference between keywords and reserved words?

Last Answer : A: Keywords have a special meaning in a language, and are part of the syntax. Reserved words are words that cannot be used as identifiers (variables, functions, etc.), because they are reserved by the ... goto is a reserved word but not a keyword (as a consequence, you cannot use it at all)

Description : What is the difference between linear and binary search?

Last Answer : A: Linear search does not require the array to be sorted, whereas, binary search requires that the array be sorted. Linear search checks for the search item in a linear fashion from the beginning cell till the end, ... tell what is control variable in your loop. So if your loop is for(int i = 1; i

Description : What is the difference between selection sort and bubble sort?

Last Answer : A: In selection sort, successive rounds are executed to select the element which is required to be placed in their sorted position, whereas, in bubble sort, every consecutive pairs of elements are compared ... element at every pass, whereas, in bubble sort we get the largest element in every pass.

Description : What is the difference between break and continue?

Last Answer : A: break keyword stops the complete loop and takes the control out of the loop, whereas, the continue keyword just stops the current iteration and takes the control to the next iteration.

Description : What is the difference between function overloading and function overriding?

Last Answer : A: In function overloading only the function name is same but function signature (list of parameters) is different, whereas, in function overriding both the function name as well as function ... is an example of static polymorphism, whereas, function overriding is an example of dynamic polymorphism.

Description : What is the difference between recursion and iteration?

Last Answer : A: Recursion is usually slower than iteration due to overhead of maintaining stack, whereas, Iteration does not use stack so it's faster than recursion. Recursion uses more memory than ... whereas, Iteration consume less memory. Recursion makes code smaller, whereas, Iteration makes code longer.

Description : What is the difference between do-while and while?

Last Answer : A: do-while lop is exit controlled (i.e. condition is checked at the exit) and runs at least once even if the condition is false whereas, while loop is entry controlled (i.e. condition is checked at the entry) and does not run even once if the condition is false.

Description : What is the difference between for and while?

Last Answer : A: The difference lies in the way they are commonly used. for loop is commonly used when the number of iterations are known whereas, while loop is commonly used when the number of iterations are not known.

Description : What is the difference between if and switch?

Last Answer : A: (a) if can compare conditions for all data types whereas, switch can only check integers and characters. (b) all kinds of relations can be checked using if whereas only equality relation can be checked using switch.

Description : What is the difference between casting and coercion?

Last Answer : A: Type Casting refers to Explicit type conversion i.e. When the conversion takes place with the programmer’s intervention, whereas, Coercion refers to Implicit type conversion i.e. When the conversion takes place on its own without the programmer’s intervention.

Description : What is the difference between throws and throw?

Last Answer : A: Using throws keyword, we can give system defined error message if any error occurs, while using throw keyword, we can force an exception and give user-defined error messages.

Description : What is the difference between print() and println() methods?

Last Answer : A: The print() functions prints a line and the control remains on the same line, whereas, the println() function prints a line and the control moves on to the next line.

Description : Methods can be overloaded with a difference only in the type of the return value .. A) Not supported B) False C) True D) None of the above

Last Answer : B) False

Description : _____ produces the relation that has attributes of R1 and R2 (A) Cartesian product (B) Difference (C) Intersection (D) Product

Last Answer : A) Cartesian product

Description : The essential difference between traps and interrupts is (A) traps are asynchronous and interrupts are synchronous with the program (B) traps are synchronous and interrupts are asynchronous with the program ( ... synchronous and interrupts are asynchronous with the I/O devices. (D) None of these.

Last Answer : (B) traps are synchronous and interrupts are asynchronous with the program

Description : A tree with n vertices is called graceful, if its vertices can be labelled with integers 1, 2, ...,n such that the absolute value of the difference of the labels of adjacent vertices are all different. Which of the following trees are ... (B) (b) and (c) (C) (a) and (c) (D) (a), (b) and (c)

Last Answer : Answer: D

Description : ECL is the fastest of all logic families. High Speed in ECL is possible because transistors are used in difference amplifier configuration, in which they are never driven into ............... (1) Race condition (2) Saturation (3) Delay (4) High impedance

Last Answer : Answer: 2  Explanation: Emitter-coupled logic (ECL) is the fastest of all logic families and therefore is used in applications where very high speed is essential. High speeds have become ... configuration, in which they are never driven into saturation and thereby the storage time is eliminated.