Sei sulla pagina 1di 10

Chapter – 01

Programming Languages

wk¶v_©xi bvgt

BwÄwbqvwis wefvMt
Royal’s CSE Job Solution

Royal’s

CSE Job
Solution
(Chapter – 01: Programming Languages)

Engr. Syed Mir Talha Zobaed


Lecturer, Dept. of Computer Science & Engineering
Pundra University of Science & Technology (PUB), Bogura
B.Sc. in Computer Science and Engineering (First Class First)
M.Sc. Engineering in CSE (1 st Class 2 nd ), University of Rajshahi
Email: engr.syed.mir.talha.zobaed@gmail.com
Cell: +88 – 01712 – 53 58 13

Meherchandi, Padma Residential Area, Boalia, Rajshahi. Cell: +88-01716-088627


ROYAL’S CSE JOB SOLU TION Engr. Syed Mir Talha Zobaed
+88-01911-088706 Page 2 of 10 +88-01712-535813
Royal’s CSE Job Solution

Chapter
1
Programming
Languages

Basics of Programming Languages


Terms Description

ROYAL’S CSE JOB SOLU TION Engr. Syed Mir Talha Zobaed
+88-01911-088706 Page 3 of 10 +88-01712-535813
Royal’s CSE Job Solution

Important Questions
1. Explain the differences between call by value and call by reference with example. [Assistant
Programmer, Palli Sanchay Bank, 2018]
2. Differentiate between constructor and destructor with example. [Assistant Programmer, Palli
Sanchay Bank, 2018] [Programmer, Palli Sanchay Bank, 2018] [Assistant Manager
Programmer, Bangladesh Land Port Authority, 2018 ]
3. Find the output of the following program: [Assistant Programmer, Palli Sanchay Bank, 2018]
int main() int main()
{ {
int n = 10; int i = 2, j = 2;
for( ; ; ) while(i?− −i:j++)
printf(“%d”, n); printf(“%d”, i);
return 0; return 0;
} }

4. Differentiate between Interpreter and Compiler. [Assistant Database Administrator, Palli


Sanchay Bank, 2018]
5. Find the output of the following program: [Assistant Database Administrator, Palli Sanchay
Bank, 2018]

int main()
{
int a = 5, b = 2, c = 1;
if(a&&b>c)
printf(“Bangladesh”);
else
break;
}

6. Explain the features of Object Oriented Programming with example. [Programmer, Palli
Sanchay Bank, 2018] [Programmer, Export Promotion Bureau, 2018] [38th BCS Written, BPSC,
2018]
7. Find the output of the following program: [Programmer, Palli Sanchay Bank, 2018]

int main() int main()


{ {
char str[120] = “Digital Bangladesh”; int i;
int n; for(i=0;i<5;i++)
n = strlen(str); {
printf(“%s”, str); if(i==3)
return 0; continue;
} printf(“%d\n”,i);
}
return 0;
}

8. Write the difference between throw and throws using exception handling. [Senior Officer
(SD), Pubali Bank, 2018]
9. What do you mean by Polymorphism and Inheritance in object oriented programming (OOP).
Give appropriate example. [Senior Officer (SD), Pubali Bank, 2018]
10. Write a C program to verify a perfect number. Perfect number is a positive integer which is
equal to the sum of its proper positive divisors. [Assistant Programmer, Bangladesh Water
Development Board, 2018]
ROYAL’S CSE JOB SOLU TION Engr. Syed Mir Talha Zobaed
+88-01911-088706 Page 4 of 10 +88-01712-535813
ROYAL’S CSE JOB SOLUTION

11. Write a Java program using 2D array and array output will be: [Assistant Programmer,
Bangladesh Water Development Board, 2018]
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

12. Write a simple Java program to convert string into camel case and display camel case string.
[Assistant Programmer, Bangladesh Water Development Board, 2018]
13. What will be the output of the following program? [Assistant Programmer, Bangladesh Water
Development Board, 2018]

int main()
{
int i = -1, j = -1, k = 0, 𝑙 = 2, m;
m = i++ && j++ && k ++||l + +;
printf(“%d %d %d %d %d”, I, j, k, l, m);
return 0;
}

14. Consider a base class Shape and its derived class Rectangle. Design a code inheritance code
using C++. [Assistant Programmer, Bangladesh Water Development Board, 2018]
15. Find the output of the following code: [Assistant Programmer, Bangladesh Water Development
Board, 2018]

public class Test


{
public static void main(String args[])
{
String s1 = “test1”;
String s2 = new String(“test1”);
System.out.println(s1==s2);
String s3 = new String(“test1”);
System.out.println(s2==s3);
S3=s1;
System.out.println(s3==s1);
}
}

16. What are the error types in programming language? Explain elaborately. [Assistant Manager
Programmer, Bangladesh College of Physicians & Surgeons College, 2018]
17. Write a program to check whether a given number is prime or not. [Assistant Manager
Programmer, Bangladesh Land Port Authority, 2018 ] [Programmer, Bangladesh National
Parliament Secretariat, 2014]
18. Find the output of the following programs: [Assistant Manager Programmer, Bangladesh Land
Port Authority, 2018]

int main()
{
char str[100];
str[100]=”Bangladesh”;
int x = strlen(str);

ROYAL’S CSE JOB SOLU TION ENGR. SYED MIR TALHA ZOBAED
+88-01911-088706 Page 5 of 10 +88-01712-535813
ROYAL’S CSE JOB SOLUTION

str[4]=`\0’;
printf(“%s”, str);
return 0;
}
int main()
{
for(i=0; i<5; i++);
if(i==1)
continue;
printf(“%d”, i);
return 0;
}

int main()
{
int x=2000, y = 3000;
if(!(!x) && x)
printf(“%d”,x);
else
printf(“%d”,y);
return 0;
}

int main()
{
char str = ‘\0’;
if(str)
printf(“Empty String”);
else
printf(“Not Empty”);
return 0;
}

19. Given an array of size 𝑛, write down a Java program to check if it is sorted in ascending order
or not. [Senior Officer (IT), Bangladesh Development Bank, 201 7]
20. Write a program using any programming language that reads five numbers from keyboard
and display the smaller, larger and average of those numbers. [Senior Officer (IT), Bangladesh
Development Bank, 2017]
21. Write some differences between Method Overloading and Method Overriding in Java. [Senior
Officer (IT), Agrani Bank Ltd., 2017] [Probationary Officer, Dutch Bangla Bank Ltd., 2016 ]
22. Write the performance of a non-recursive function which is written in recursive way. [Officer
(IT), Agrani Bank Ltd., 2017]
23. Explain with examples different data types used in C language. [Assistant Programmer,
Different Ministry(BPSC), 2017]
24. Write a program to read the coordinates of the end points of a line and to find its length. Use
a structured variable name ‘Line’ to store the relevant information about its end points.
[Assistant Programmer, Different Ministry(BPSC), 2017 ]
25. Write a C program to calculate the sum of the following series:
1 + (1 + 2) + (1 + 2 + 3) + ⋯ + (1 + 2 + ⋯ + 𝑛)
[Assistant Programmer, Different Ministry(BPSC), 2017 ]
26. Explain in details the different forms of looping statement in C language. [Assistant
Programmer, Different Ministry(BPSC), 2017 ]

ROYAL’S CSE JOB SOLU TION ENGR. SYED MIR TALHA ZOBAED
+88-01911-088706 Page 6 of 10 +88-01712-535813
ROYAL’S CSE JOB SOLUTION

27. Write a C program with recursive function to compute the value 𝑋 𝑛 where 𝑛 is a positive
integer and 𝑥 has real value. [Assistant Programmer, Different Ministry(BPSC), 2017 ]
28. Write a C program to sort an array and find max, min value. [Application Developer, Islami
Bank Bangladesh Limited, 2017]
29. Write a C program to calculate GPA, Average and Total Marks of a student obtained in a
particular semester in his/her university. [Application Developer, Islami Bank Bangladesh
Limited, 2017]
30. What is pointer in C? Example. [Application Developer, Islami Bank Bangladesh Limited, 2017]
31. Write down the component of Java Virtual Machine and explain in brief. [Application
Developer, Islami Bank Bangladesh Limited, 2017 ]
32. What is Object Oriented Programming? What are the main features of Object Oriented
Programming? [Assistant Programmer, Bangladesh National Parliament Secretariat, 2017]
[37 th BCS Written, BPSC, 2018]
33. What type of problems can be solved using data abstraction? [Application Developer, Islami
Bank Bangladesh Limited, 2017] [37 th BCS Written, BPSC, 2018]
34. What are the objects in C++? [Application Developer, Islami Bank Bangladesh Limited, 2017]
35. How is a member function of a class defined? [Application Developer, Islami Bank Bangladesh
Limited, 2017] [37 th BCS Written, BPSC, 2018]
36. What is the difference among String, StringBuffer, and StringBuilder? [Probationary Officer,
Dutch Bangla Bank Ltd., 2016]
37. What is the difference between Implement runnable interfaces and extend thread class?
[Probationary Officer, Dutch Bangla Bank Ltd., 2016 ]
38. Write a Java program based on the following conditions: there is one circle class and one
cylinder class. Circle class has an area function. Cylinder class has to calculate the circle area
at the base and height of its own (Cylinder Volumn = Circle area * height). Use inheritance to
calculate the Volume of the cylinder. [Probationary Officer, Dutch Bangla Bank Ltd., 2016 ]
39. Write a structure program to display Fibonacci series upto 100 numbers. [Assistant
Maintenance Engineer, Bangladesh Bank, 2016]
40. What is the difference between while and do-while loop? [Assistant Maintenance Engineer,
ICT Division, 2014]
41. Write a C/C++ program to calculate factorial of any integer. [Assistant Maintenance Engineer,
ICT Division, 2014]
42. What is programming? Write the main features of OOP? [Assistant Programmer, ICT Division,
2014] [37 th BCS Written, BPSC, 2018]
43. What is Structured Programming Language? Explain with example. [38 th BCS Written, BPSC,
2018]
44. Write a Program to store information using structures with dynamic memory allocation. [38 th
BCS Written, BPSC, 2018]
45. State the advantages and disadvantages of Object Oriented Programming (OOP) over
Structured Programming? [38 th BCS Written, BPSC, 2018]
46. Explain encapsulation and inheritance in details. [38 th BCS Written, BPSC, 2018]
47. Why are the following two overloaded functions inherently ambiguous?
int f(int a, int b=5);
int f(int &a);
[38 th BCS Written, BPSC, 2018]
48. Write a Java program to check whether String2 is superscript of String1 or not. [Manager
(Sfotware), NESCO, 2018]
49. Write a C program for multiplication of two given input numbers. [Assistant Programmer,
Bangladesh Steep & Engineering Corporation, 2018 ]
50. Write a C program to find out the second max element in an array without using any library
and sorting. [Probationary Officer (Software), Dutch Bangla Bank Ltd, 2018]
51. Write a C program to print out a diamond pattern. If 𝑛 = 5, then it prints:
*

ROYAL’S CSE JOB SOLU TION ENGR. SYED MIR TALHA ZOBAED
+88-01911-088706 Page 7 of 10 +88-01712-535813
ROYAL’S CSE JOB SOLUTION

* * *
* * * * *
* * *
*
[Probationary Officer (Software), Dutch Bangla Bank Ltd, 2018 ]
52. Write a C program to find out the number of occurrence of a digit, 𝑑 in a given number,
𝑁𝑢𝑚𝑏𝑒𝑟. [Probationary Officer (Software), Dutch Bangla Bank Ltd, 2018 ]
53. Write a C program to evaluate the series:
1 ∗ 3 + 2 ∗ 5 + 3 ∗ 7 + ⋯ . +𝑛 ∗ (2𝑛 + 1)
[Probationary Officer (Software), Dutch Bangla Bank Ltd, 2018 ]
54. Create a class Rational and
a. Create two private int type property named numerator and denominator and create a
constructor having no arguments and set numerator and denominator value to 1.
b. Create a constructor with two int type argument and set these arguments to numerator
and denominator.
[Probationary Officer (Software), Dutch Bangla Bank Ltd, 2018 ]
55. Write a program to print all prime numbers between given specific ranges. [Assistant
Programmer(SAT), ICT Division, 2018 ]
56. Write a program to count number of words from a given input string. [Assistant
Programmer(SAT), ICT Division, 2018 ]
57. Write a program to print the following pattern (if 𝑛 = 5):
1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
[Assistant Programmer(SAT), ICT Division, 2018 ]
58. Write a program to check whether a given number is palindrome or not? [Assistant
Programmer(SAT), ICT Division, 2018 ]
59. Write a C program to show all prime numbers starting from 19 to 100 consecutive numbers
with built-in functions. [Assistant Programmer(SAT), Multiple Ministry (BPSC), 2017 ]
60. Write a C program to reverse a given string without using any library functions. [Assistant
Programmer(SAT), Multiple Ministry (BPSC), 2017 ]
61. Write a C program to show half inverted pyramid using star (*).[Assistant Programmer(SAT),
Multiple Ministry, 2017]
62. Write a program that takes five positive integers as input and find out the summation of the
input digits repeatedly until result is converged to a single digit. [Assistant Programmer,
Bangladesh Parliamentary (SAT), 2018 ]
63. You have given a list of words. Write code that will take a line as follows:
[“Abedin”, “Rose”, “Ivan”], then your code would print the following:
i) Navi
ii) Esor
iii) Nibeda
[Assistant Programmer, Bangladesh Parliamentary (SAT), 2018]
64. Write a program to find the factorial of a given input number 𝑛 using recursion. [Assistant
Programmer, Bangladesh Parliamentary (SAT), 2018 ]
65. Write a program to generate the following pyramid:
Sample Input: 5
Sample Output:
* * * * *
* * * *
* * *
* *

ROYAL’S CSE JOB SOLU TION ENGR. SYED MIR TALHA ZOBAED
+88-01911-088706 Page 8 of 10 +88-01712-535813
ROYAL’S CSE JOB SOLUTION

*
[Assistant Programmer, Bangladesh Parliamentary (SAT), 2018 ]
66. Write a program to sort a string in alphabetic order. [Assistant Programmer, Export Promotion
Beureau of Bangladesh (SAT), 2018 ]
Sample Input: adc1a2
Sample Output: 12aacd
67. Write a C program to find maximum and minimum element in array.
[Assistant Programmer, Export Promotion Beureau of Bangladesh (SAT), 2018 ]
68. Given a sentence, task is to remove spaces from the sentence and rewrite in Camel case. It is
a style of writing where we don’t have spaces and all words begin with capital letters.
[Assistant Programmer, Export Promotion Beureau of Bangladesh (SAT), 2018 ]
Sample Input: I got intern at geeksforgeeks
Sample Output: IGotInternAtGeeksforgeeks
69.

ROYAL’S CSE JOB SOLU TION ENGR. SYED MIR TALHA ZOBAED
+88-01911-088706 Page 9 of 10 +88-01712-535813
GKv‡WwgK feb ROYAL’S CSE JOB SOLUTION

i‡qj BwÄwbqvwis GKv‡Wgx


†g‡niPÊx (PKcvov), ivRkvnx

Royal Engineering Academy


ROYAL’S CSE JOB SOLU TION
+88-01911-088706 Page 10 of 10
ENGR. SYED MIR TALHA ZOBAED

†nvwìs bs - 181/3, 4_© Zjv, mxgv bxjq, †g‡niPÊx PKcvov, ivRkvnx


+88-01712-535813

†gvevBjt +88-01911-088 706; +88-01712-53 58 13; +88-01719-0333 64

Potrebbero piacerti anche