Java Interview Questions Set 4
Categories: Java 8(JDK1.8) ||
What is the output of the following Java program?class Test { public static void main (String args[]) { &n
Categories: Java 8(JDK1.8) ||
What is the output of the following Java program?class Test { public static void main (String args[]) { &n
Categories: Java 8(JDK1.8) ||
What is the default value of the local variables?The local variables are not initialized to any default value, neither primitives nor object references. What are the various access specifiers in
Categories: Java 8(JDK1.8) ||
What gives Java its 'write once and run anywhere' nature?The bytecode. Java compiler converts the Java programs into the class file (Byte Code) which is the intermediate language between source code a
Categories: Java 8(JDK1.8) ||
How many types of memory areas are allocated by JVM?Class(Method) Area: Class Area stores per-class structures such as the runtime constant pool, field, method data, and the code for methods.Heap: It
Categories: Java 8(JDK1.8) ||
What is Java?Java is the high-level, object-oriente, robust, secure programming language, platform-independent, high performance, Multithreaded, and portable programming language. It was developed by
Categories: C Programming language ||
Write a program to print factorial of given number using recursion?#include<stdio.h> #include<conio.h> long factorial(int n) &
Categories: C Programming language ||
Write a program to print "hello world" without using a semicolon?#include<stdio.h> void main(){ if(printf("hello world")){} // It prints t
Categories: C Programming language ||
What is the acronym for ANSI?The ANSI stands for " American National Standard Institute." It is an organization that maintains the broad range of disciplines including photographic film, computer lang
Categories: Intermediate class || MCQ || Accountancy ||
Reconstitution of partnership MCQ Quiz Questions with Answers for Class 12 (set 3) Q1. The amount of goodwill is paid by new partner: for the payment of capital for sharing
Categories: Intermediate class || MCQ || Accountancy ||
Reconstitution of partnership MCQ Quiz Questions with Answers for Class 12 set 2 Q1. In which ratio, the cash brought in for goodwill by the new partner is shared by the existing partners:
Categories: Intermediate class || MCQ || Accountancy ||
Accountancy reconstitution of partnership MCQ Quiz Questions with Answers for Class 12 Q1. Goodwill is nothing more than probability that the old customer will resort to the old place. This d
Categories: C Programming language ||
Ques. What is a union?Ans. The union is a user-defined data type that allows storing multiple types of data in a single unit. However, it doesn't occupy the sum of the memory of all members. It holds
Categories: C Programming language ||
Ques. What functions are used for dynamic memory allocation in C language?Ans. malloc()The malloc() function is used to allocate the memory during the execution of the program.It does not initialize t
Categories: C Programming language ||
Ques. What is a far pointer in C?Ans. A pointer which can access all the 16 segments (whole residence memory) of RAM is known as far pointer. A far pointer is a 32-bit pointer that obtains information
Categories: C Programming language ||
Ques. What is an array in C?Ans. An Array is a group of similar types of elements. It has a contiguous memory location. It makes the code optimized, easy to traverse and easy to sort. The size a
Categories: C Programming language ||
Ques. What is the use of printf() and scanf() functions?printf(): The printf() function is used to print the integer, character, float and string values on to the screen.Following are the format speci
Categories: C Programming language ||
Ques. What is C language?Ans. C is a mid-level and procedural programming language. The Procedural programming language is also known as the structured programming language is a technique in whic
Categories: Intermediate class || MCQ || Accountancy ||
Accountancy of partnership MCQ Quiz Questions with Answers for Class 12 Q1. Features of a partnership firm are: Two or more persons Sharing profit and losses in the agreed ratio
Categories: Freshers || Intermediate class || MCQ || Accountancy ||
Accountancy MCQ Quiz Questions with Answers for Class 12 part 2 Q1. Income and Expenditure Account generally indicates: Surplus/Deficit Cash Balance Capital Fund Net Pro
Categories: Intermediate class || Accountancy ||
Accountancy MCQ Quiz Questions with Answers for Class 12 Q1. Receipts and Payments A/c is a summary of: All Capital Receipts and Payments All Revenue Receipts and Payments All Revenu
Categories: C language ||
Following are the differences of the typedef and the #define, as follows:SN - Typedef - #define1.Typedef is a keyword in the C programming language.#define is a pre-processor and used as macro used in
Categories: C language ||
Example 1: Consider a program to use the #define pre-processor in C.Define.c#include <stdio.h> #include <conio.h> #define PI 3.14 // define the constant variable 
Categories: C language ||
Let's consider a program to use the typedef keyword in structure to provide a new name to the struct and initialize the structure variables, as follow:Struct.c#include <stdio.h> #incl
Categories: C language ||
typedef:A typedef is a keyword used in C programming to define a new name for exiting data types. But it cannot provide a new data type to the predefined data type. Instead, it provides a meaning full
Categories: C language ||
A function call is an important part of the C programming language. It is called inside a program whenever it is required to call a function. It is only called by its name in the main() function of a
Categories: C language ||
Before jumping to the function call, we need to understand the function in the C programming language. A function is a group of tasks used to execute the predefined operations and returns a value. A l
Categories: C language ||
The getch() is a predefined non-standard function that is defined in conio.h header file. It is mostly used by the Dev C/C++, MS- DOS's compilers like Turbo C to hold the screen until the user passes
Categories: C language ||
The enum in C is also known as the enumerated type. It is a user-defined data type that consists of integer values, and it provides meaningful names to these values. The use of enum in C makes the pro
Categories: C language ||
The following are the differences between low-level language and high-level language:Low-level language - High-level languageIt is a machine-friendly language, i.e., the computer understands the
Categories: C language ||
The following are the differences between machine-level language and assembly language:Machine-level language- Assembly languageThe machine-level language comes at the lowest level in the hierarchy, s
Categories: C language ||
A programming language defines a set of instructions that are compiled together to perform a specific task by the CPU (Central Processing Unit). The programming language mainly refers to high-level la
Categories: C language ||
The C program follows many steps in execution. To understand the flow of C program well, let us see a simple program first.File: simple.c#include <stdio.h> int main(){ &n
Categories: C language ||
To understand the way our C program works, we need to understand the arrangement of the memory assigned to our program.All the variables, functions, and data structures are allocated memory into a spe
Categories: Freshers || NCERT Solutions ||
History Of Accountancy Q1: Explain the development of and role of accounting. Answer: Development of accounting in ancient times, around 4000 B.C., accounting was used for recording wa
Categories: Freshers || NCERT Solutions ||
NCERT Solutions for Class 11 Accountancy Financial Accounting part 2 Q1: The role of accounting has changed over the period of time"- Do you agree? Answer: The role of accounting&
Categories: Freshers || NCERT Solutions ||
NCERT Solutions for Class 11 AccountancyFinancial Accounting Q1: Define accounting.Answer: Accounting is a process of identifying the events of financial nature, recording them in Journal, c
Categories: C Programming language || C language ||
Program Structure with “Hello World” Example A C program basically consists of the following parts: Preprocessor Commands Functions Variables Statements &
Categories: C Programming language || C language ||
The C Compiler work in C language and its important The source code written in a source file is the human-readable source for your program. It needs to be "compiled", to turn into m
Categories: Freshers || C Programming language || C language ||
Inception Of C Language Tutorial for Beginners The C programming language is a general-purpose, high-level language that was originally developed by Dennis M. Ritchie to develop the UNIX oper
Categories: C language ||
An expression is a formula in which operands are linked to each other by the use of operators to compute a value. An operand can be a function reference, a variable, an array element or a constant.Let
Categories: C language ||
The arguments passed from command line are called command line arguments. These arguments are handled by main() function.To support command line argument, you need to change the structure of main() fu
Categories: C language ||
The #pragma preprocessor directive is used to provide additional information to the compiler. The #pragma directive is used by the compiler to offer machine or operating-system feature.Syntax:#pragma
Categories: C language ||
The #error preprocessor directive indicates error. The compiler gives fatal error if #error directive is found and skips further compilation process.C #error exampleLet's see a simple example to use #
Categories: C language ||
The #else preprocessor directive evaluates the expression or condition if condition of #if is false. It can be used with #if, #elif, #ifdef and #ifndef directives.Syntax:#if expression //if
Categories: C language ||
The #if preprocessor directive evaluates the expression or condition. If condition is true, it executes the code otherwise #elseif or #else or #endif code is executed.Syntax:#if expression
Categories: C language ||
The #ifndef preprocessor directive checks if macro is not defined by #define. If yes, it executes the code otherwise #else code is executed, if present.Syntax:#ifndef MACRO //code &nbs
Categories: C language ||
The #ifdef preprocessor directive checks if macro is defined by #define. If yes, it executes the code otherwise #else code is executed, if present.Syntax:#ifdef MACRO //code #end
Categories: C language ||
The #undef preprocessor directive is used to undefine the constant or macro defined by #define.Syntax:#undef token Let's see a simple example to define and undefine a constant.#include <
Categories: C language ||
The #define preprocessor directive is used to define constant or micro substitution. It can use any basic data type.Syntax:#define token value Let's see an example of #define to define a co
Categories: C language ||
The #include preprocessor directive is used to paste code of given file into current file. It is used include system-defined and user-defined header files. If included file is not found, compiler rend