Toshiba Interview Questions


C


1)Difference between static and const variables?


2)Explain the Memory layout of the Program?


3)What is Volatile Keyword?


4)What is the Scope of a static variable?


5)Write a Program to Reverse a string?


6)Write a program to count the number of bits set to 1 in a 32-bit integer?


7)Write logic to find the sorted array in descending order?


8)What are the different types of pointers in c?


9)Write a Program to find one defective ball out of 9 balls?


10)Difference between extern and register keywords?


11)Write a Program to Reverse a string without using another variable?


12)Write a Program for clearing a bit at a particular position?


13)what are the bitwise operators?


14)Write a program to find the given number is the power of two or not?


15)Write a program to find the given number is the power of 4 or not?


16) Tell me the logic how will you convert 1024*1024 image into 512*512 image?


17)Write a Program to swap the array of elements in adjacent positions?

    Example :Input :{a,b,c,d}

           Output :{b,a,dc}


18)Write a Program for finding the string length without using strlen() 

      user defined function?


19)Write a Program for string reverse without using strrev() user defined function?


20)Difference between Static Memory allocation and Dynamic Memory allocation?


21)Difference between Structure and Union ?


22)What is Structure Padding?


23)Write a Program for own strstr() function?


24)Write a Program to find whether the string is Palindrome (or) not?


25)Write a Program for String Anagram ?


26)What is Pointer?


27)What is Dangling Pointer?


28)What is Type Def?


29)What is Memory Leak?


30)Explain about Storage Classes ?


C++


1)What is object slicing?


2)Difference between new and malloc?


3)What is Virtual Table and Virtual Pointer?


4)Difference between Abstract classes and  Interfaces?


5)What is Copy Constructor?


6)What is Virtual Function?


7)Explain about Singleton Design Pattern?


8)What is Run time Polymorphism?


9)What is Compile TimPolymorphism?


10)What is Virtual Class?


11)What is Operator Overloading?


12)What is Friend Function?


13)What are Templates?


14)Difference between Static keyword and Static functions?


15)What is Smart Pointer?


16)Write a program to implement std:: string class


17)Write a Program for operator overloading using friend function?


18)Explain about Inheritance?


19)Explain about Oops Concept?


20)Difference between Structure and Class ?


21)Can a Class Object be Static?


22)What is Polymorphism ?


23)Write a Program for ++ Operator Overloading?


24)Difference between pointer and reference ?



Data Structures


1)Write a Program to Reverse a linked list?


2)Write a Program to Search for an element in the binary tree?


3)Write a Program to implement a queue using a linked list?


4)What is STACK, Queue, Linked List?


5)Write a Program to create a linked list just insert the linked list one by one?


6)Write a Program to insert and delete a node on the Linked list?


7)Write a program to search and delete a node in a Tree?


8)Write a Program to create a tree data structure for the given elements?


9)Write a Program to reverse half of the single linked lists?


10)Write a Program to find root node and child node are equal then

      count should be displayed?


11)Write a Program to Find if the sum of two elements anywhere in the tree 

      structure is 89 then count++?





Linux


1)Difference between Semaphore and Mutex?


TCP/IP


1)Explain TCP/IP protocol?


Embedded Systems 


1)what is interrupt?


Aptitude


1)8x8 matrix or board is there

  How many possible squares?   


2)You’ve got someone working for you for seven days and a gold bar to pay him. 

    The gold bar is segmented into seven connected pieces. You must give them

    a piece of gold at the end of every day. What and where are the fewest number 

    of cuts to the bar of gold that will allow you to pay him 1/7th each day?


3)A snail wishes to reach a water shore. To do this it must cross a wall 

   which is 30 feet high. It has a time limit of 30 hours to reach atop the

   wall. The time starts as soon as it starts climbing the wall. However, 

   he faces a problem while climbing. Every hour it climbs the wall 3

   feet up, it slides down 2 feet. This occurs every hour. So how many

   hours will it take for the snail to reach atop the wall?