1.What is an abstract class? Abstract classes are classes that contain one or more abstract methods. An abstract method is
Category: Interview Question
what is jvm in java
Virtual machine : In general terms Virtual machine is a software that creates an environment between the computer and end
Q17 Write your own function of memcpy().
User defined function of memcpy(). #include<stdio.h> #include<string.h> #include<stdlib.h> void own_memcpy(void *to, void *from, int n) { while(n- -)
Q16 What is the difference between memcpy and memmove.
Hmm friends this is interviewer’s favourite question. Interviewer wants to know, how you handle byte stream. Prototype of memcpy() void
Core Java – OOPs Concepts: OOPs Interview Questions
What are the principle concepts of OOPS? There are four principle concepts upon which
User defined function of strcmp()
User defined function of strcmp() strlen is used to compare two strings. If return value is zero means both strings are
User defined function of strncpy()
User defined function of strcpy() strncpy is used to copies first n character of a string to another. Prototype of
User defined function of strcpy()
User defined function of strcpy() strcpy is used to copies a string to another. Prototype of strcpy() function : char*
Q15 Write your own C program of strlen(), strcpy(), strncpy() and strcmp()
Interview can ask write your own program or user defined function of strlen(), strcpy(), strncpy(). User defined function of strlen() strlen
Q14. Write a C program to reverse the place of words in a sentence.
Suppose input is “Welcome to gyantoday” then output should be “gyantoday to welcome” Steps of algorithm: Reverse whole sentence first.
Q13. Write a C program to reverse a word.
Also interviewer can ask to write a C program to reverse a string. In below program we give input “welcome
Q12. Write a program to print diagonal element of an N*N matrix.
Lets take a matrix of 4*4 i.e. int matrix [4][4]; 11 12 13 14 21 22 23 24 31
Q11. How to generate fibonacci sequence up to given nth number?
First we should know what fibonacci sequence is: The Fibonacci Sequence is the series of numbers: 0, 1, 1, 2, 3, 5, 8, 13,
Q10. How to fast multiply a number by 4?
Bitwise operations are slightly faster than addition and subtraction operations and usually significantly faster than multiplication and division operations. Because