#include<stdio.h> int main() { int i, j, temp, arr[10]; printf(“Enter the number with some repeated number\n”); for(i
Q24 Write a C program to convert from decimal to binary, octal, or hex number system.
#include<stdio.h> void decimal_to_any_base(int number, int base) { int i, x, digits[1000], flag; i = 0; while(number)
Q23 Write a C program which produces its own source code as its output.
#include<stdio.h> int main() { FILE *fptr; char chr; fptr = fopen(__FILE__,”r”); do{ chr= getc(fptr); putchar(chr); } while(chr!=EOF); fclose(fptr); return 0;
Q22 How to add sum the digits of a given number in single statement?
Twisted question from interviewer, but not difficult. for(; num > 0; sum += num%10, num /= 10); printf(“Sum = %d\n”,sum);
Core Java:Constructor interview question
What is Constructor? A constructor is a special method that is used to initialize an object of the class. It
Q21 Write your own program to implement the atoi() function.
What atoi() function does? atoi() function is used to convert a string to an integer #include int own_atoi(const char *str)
Q20 Write your own function of memset().
memset() function is used to initialize a block of memory to a specified value. User defined function of memset(). #include<stdio.h> #include<string.h>
Cell phone usage pattern can detect real time unemployment
Study: Usage patterns vary when people are not working. If you leave your job, chances are your pattern of cellphone
Q19 Write your own function of memcmp().
memcmp() function is used to perform byte by byte comparison. Given below user defined memecmp() function. #include<stdio.h> #include<string.h> #include<stdlib.h> int
Researchers has developed an automatic computer bug repair system.
System fixes bugs by importing functionality from other programs, without access to source code At the Association for Computing Machinery’s
Q18 Write your own function of memmove().
User defined function of memmove(). #include<stdio.h> #include<string.h> #include<stdlib.h> void own_memmove(void *to, const void *from, int n) { unsigned char
Core Java:Interface interview question
1.What is an Interface? In its most common form, an interface is a group of related methods with empty bodies.
Core Java:Abstraction interview question
1.What is an abstract class? Abstract classes are classes that contain one or more abstract methods. An abstract method is
what is jvm in java
Virtual machine : In general terms Virtual machine is a software that creates an environment between the computer and end