LTE stands for Long Term Evolution and is a registered trademark owned by ETSI (European Telecommunications Standards Institute) for the wireless data communications
Author: Gyantoday
Q26 Write a C program to check leap year.
#include<stdio.h> int main() { int year; printf(“Enter any year to check leap year\n”); scanf(“%d”,&year); if((year %
Q25 Write a C program to find duplicate integer in an array.
#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);
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
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