Interviews Questions, Algorithms, Aptitude, C Interview Program, C Theory Question, Aptitude Tricks, Test Series,

Thursday, 16 May 2019

Frequency of each element of an array

Question:

Write Program to find Frequency of each element of an array


Solution:


Number of even and odd elements in an array

Question:

Write Program to find the number of even and odd elements in an array

Solution:



Array type

Question:

Write Program to find the array type

Solution:


Two arrays are the same or not

Question:

Write Program to check if two arrays are the same or not
 

Solution:


Aptitude Hack#82(16-5-19)

Question:

Find the unit’s digit in (264)^102 + (264)^103

   A )   0
   B )   1
   C )   2
   D )   3



Wednesday, 15 May 2019

Aptitude Hack#81(15-5-19)

Question:

From a group of boys and girls,15 girls leave. There are then left 2 boys for each girl. after this,45 boys leave.there are then 5 girls for each boy. Find the number of girls in the beginning?

  A )   50
  B )   51
  C )   41
  D )   40

Tuesday, 14 May 2019

The Interview Question Today#27(26-3-19)(Size of structure)

Question:

Write a c program to find the size of structure without using sizeof operator?

Solution:

C program:

#include<stdio.h>
struct  XYZ{
    int x;
    float y;
    char z;
};

int main(){
    int sz = (int) (((struct XYZ *)0) + 1);
    printf("Size of Struct= %d",sz);
    return 0;

}


Output:

Size of Struct= 12

Count common sub sequence in two strings

Question:

Write a Program to Count common subsequence in two strings


Solution:


Replace substring in a string

Question:

Write a Program to Replace substring in a string


Solution:



Non-repeating characters in a string

Question:

Write a Program to print Non-repeating characters in a string

Solution:



Calculate the Frequency of characters in a string

Question:

Write a Program to calculate the Frequency of characters in a string

Solution: