1. how to find max price from price of 20 items.
#include <stdio.h>
int main()
{
int n,i,arr[100],max;
printf("Enter the number of items: ");
scanf("%d", &n);
printf("Enter the elemnets: ");
for(i=0;i<n;i++){
scanf("%d", &arr[i]);
}
max = arr[0];
for(i=1;i<n;i++){
if(arr[i]>max){
max = arr[i];
}
}
printf("max number is %d",max);
return 0;
}
2. half pyramid pattern
#include <stdio.h>
int main()
{
int row,col;
for(row=5;row>=1;row--){
for(col=1;col<=row;col++){
printf("%d ",col);
}
printf("\n");
}
return 0;
}
3. prime number 1 to 100?
#include<stdio.h>
#include<conio.h>
int main()
{
int n,i,fact,j;
for(i=1; i<=100; i++)
{ fact =0;
for(j=1; j<=100; j++)
{
if(i%j==0)
fact++;
}
if(fact==2)
printf("%d " ,i);
}
return 0;
}
Why are page sizes always powers of 2?
Answer: Paging is implemented by breaking up an address into a page and offset number. The most efficient method is to break the address into X page bits and Y offset bits. This is done rather than performing calculations on the address to calculate the page number and offset. Splitting an address between bits results in a page size that is a power of 2 because each bit position represents a power of 2
5. what is Piggybacking?
This technique of temporarily delaying the acknowledgement so that it can be hooked with next outgoing data frame is known as piggybacking.
difference among hub, switch, router?
mcq Part
bangla ৫ 4
1. অভিজ্ঞতার অভাব আছে যার অনভিজ্ঞ।
২। অহংকার নেই যার নিরহংকার।
৩।
অক্কা পাওয়া (মরে যাওয়া): | যে কোন দিনই থুত্থুড়ে বুড়োটা অক্কা পেতে পারে। |
অগ্নিপরীক্ষা (কঠিন পরীক্ষা): | ২০০৭ সালে বংলাদেশ ক্রিকেট দলের শ্রীলংকা সফর ছিল অগ্নিপরীক্ষা। |
সাধারন জ্ঞান ৫ 3
১। আয়তনে সবচেয়ে বড় বিভাগ কোনটি?
---চট্টগ্রাম
২। বেশি বৈদেশিক মুদ্রা আয় হয় গার্মেন্টস সেক্টর থেকে
৩ ।প্রশ্ন: বিশ্বের কতটি দেশে বাংলাদেশের দূতাবাস রয়েছে ?
উত্তর: ৫৭টি (মিশন ৭৩টি)
৪। কোন দেশের সাথে বাংলাদেশের কূটনৈতিক বা বাণিজ্যিক সম্পর্ক নেই ?
শীলঙ্কা
মালদ্বীপ
ভুটান
নেপাল
৫। কত জন মন্ত্রী নির্বাচিত হয়েছেন
ইংলিশ ৫ 5
১। he is good ----- mathmatics . ans: at
২। work hard ........ you should fail your examination at: lest
৩।
৪।
৫.
গনিত ১০ 10
১ son and father
২ basher length
৩ cost and profit onupat
৪ x2+y2 er value?
৫ ab er value?
IT 40 25 22+25
1. Assuming int is of 4bytes, what is the size of int arr[15];?
a) 15
b) 19
c) 11
d) 60
a) 15
b) 19
c) 11
d) 60
Answer: d
Explanation: Since there are 15 int elements and each int is of 4bytes, we get 15*4 = 60bytes.
Explanation: Since there are 15 int elements and each int is of 4bytes, we get 15*4 = 60bytes.
2. Elements in an array are accessed _____________
a) randomlyb) sequentially
c) exponentially
d) logarithmically
Answer: a
Explanation: Elements in an array are accessed randomly. In Linked lists, elements are accessed sequentially.
Explanation: Elements in an array are accessed randomly. In Linked lists, elements are accessed sequentially.
3. An array elements are always stored in ________ memory locations.
A. Sequential
B. Random
C. Sequential and Random
D. None of the above
Answer: Option A
4. A queue follows __________
a) FIFO (First In First Out) principleb) LIFO (Last In First Out) principle
c) Ordered array
d) Linear tree
Answer: a
Explanation: Element first added in queue will be deleted first which is FIFO principle.
Explanation: Element first added in queue will be deleted first which is FIFO principle.
5. Network topology in which you connect each node to network along a single piece of network cable is called
bus topology
ring topology
star topology
mesh topology
Ans: bus topology
6.. Which of the following protocols uses both TCP and UDP?
a) FTP
b) SMTP
c) Telnet
d) DNS
View Answer
Answer: d
Explanation: DNS and some other services work on both TCP and the UDP protocols. DNS uses TCP for zone exchanges between servers and UDP when a client is trying to resolve a hostname to an IP address
7. What is/are the main component / components of user interface ?
ans: Presentation language and action language
ans: Presentation language and action language