This blog explains about Optisal Business Solutions Interview Questions, which are given below :
Optisol Business Solutions :
1. What is the output of the following program?
#include<stdio.h>
int main()
{
int a=10;
switch(a)
{
case '1';
printf("ONE\n");
break;
case '2';
printf("TWO\n");
break;
default;
printf("NONE\n");
}
return 0;
}
2. What is the Output of the Following Program?
#include<stdio.h)
int main()
{
int a=1, 2;
printf("a : %d\n", a);
return 0;
}
3. What is the Output of the following Program?
#defineABC 20
#defineXYZ 10
#defineXXX ABC-XYZ
void main()
int a;
a = XXX * 10;
printf("%d", a);
}
4. What is the DDL?
DDL (Data Definition Language) is a part of SQL that is used to create, change, or delete the structure of a database. DDL is a group of SQL commands used to define and manage the structure of a database. It helps you create, modify, or remove tables and other database objects.
5. What is the difference between a Primary key and a unique key?
- Primary key: one per table, no duplicates, no empty values.
- Unique key: can have several per table, no duplicates, but can have an empty value.
PART – B
1. Print Letters followed by their Frequency.
Ex: input:aaabcc Output: a3b1c2
2. Write any three of the following.
1. Write a Sample Program for Method Overloading & Method Overriding
2. Write a Sample SQL query using the “Inner Join” keyword.
3. Write a Sample Program using Collections. (Use List, Map, or Set)
4. Write a Program to Reverse a String Using Recursion.
5. Write a Program to find duplicate Characters in a String.