C Programming C-Programming MCQs
Showing 34 questions (Total: 34)
নিচের কোনটি প্রোগ্রামিং ল্যাংগুয়েজ?
Correct Answer:
গ: সি
Explanation:
নিচের কোনটি প্রোগ্রামিং ল্যাংগুয়েজ? সঠিক উত্তর সি কম্পিউটারের বিভিন্ন সমস্যার সমাধানে একে ‘১’ ও ‘০’ দ্বারা গঠিত ডিজিটাল সংকেতের সাহায্যে বুঝিয়ে তা সমাধান করা হয় । এই ডিজিটাল সংকেত দ্বারা গঠিত কৃত্রিম ভাষাই হলো কম্পিউটারের প্রোগ্রামিং ল্যাঙ্গুয়েজ। যেমন – BASIC, PASCAL, C + + , FORTRAN ইত্যাদি। অন্যদিকে পাওয়ার পয়েন্ট ও এমএসে এক্সেল দুইটি প্যাকেজ প্রোগ্রাম এবং উইন্ডোজ একটি সিস্টেম নিয়ন্ত্রণ প্রোগ্রাম। জেনে রাখা ভালো - বর্তমানে PYTHON হোলো সবচেয়ে জনপ্রিয় প্রোগ্রামিং ভাষা ।
In a computer program, the process of executing the same instructions over is called :
Correct Answer:
B: Looping
Explanation:
In a computer program, the process of executing the same instructions over is called : Correct Answer Looping প্রোগ্রামের অংশ বিশেষ নির্দিষ্ট সংখ্যক বার কোনো শর্তে না পৌছা পর্যন্ত পুনরাবৃত্তি করাকে লুপিং বলে।
The place value in a string of decimal digits are expressed by
Correct Answer:
C: powers of 10
Explanation:
The place value in a string of decimal digits are expressed by Correct Answer powers of 10 উত্তরঃ চিত্রানুযায়ী, প্রশ্নে উল্লেখিত অপশন গুলোর মধ্যে Option - 3 যুক্তিযুক্ত।
নিচের কোনটি সেকেন্ডারি স্টোর ডিভাইজ (Secondary Store Device)-এর উদাহরণ নয়?
Correct Answer:
খ: র্যাম (RAM)
Explanation:
নিচের কোনটি সেকেন্ডারি স্টোর ডিভাইজ (Secondary Store Device)-এর উদাহরণ নয়? সঠিক উত্তর র্যাম (RAM) র্যান্ডম অ্যাক্সেস মেমোরি(ইংরেজি: Random access memory), সংক্ষেপে র্যাম (RAM) হল এক ধরনের কম্পিউটারের উপাত্ত (ডাটা) সংরক্ষণের মাধ্যম। র্যাম থেকে যে কোন ক্রমে উপাত্ত "অ্যাক্সেস" করা যায়,। এ কারণেই একে র্যান্ডম অ্যাক্সেস মেমোরি বলা হয়। র্যান্ডম শব্দটি দিয়ে এখানে বুঝানো হয়েছে - যে কোনো উপাত্ত (তার অবস্থানের উপরে নির্ভর না করে) ঠিক একই নির্দিষ্ট সময়ে উদ্ধার করা যায়।
which of the declaration is correct?
Correct Answer:
A: Int length,
___ is a statement that is executed automatically by the system.
Correct Answer:
A: trigger constraint
Explanation:
___ is a statement that is executed automatically by the system. Correct Answer trigger constraint A database trigger is what is executed automatically in response to certain events on a particular table or view in a database. It is mostly used to maintain the integrity of the database.
what does a COMMIT statement do to a CURSOR :
Correct Answer:
D: None of these
Explanation:
what does a COMMIT statement do to a CURSOR : Correct Answer None of these The COMMIT statement releases all row and table locks, and erases any savepoints you marked since the last commit or rollback. Until your changes are committed: You can see the changes when you query the tables you modified, but other users cannot see the changes.
what is the time complexity of Huffman Coding?
Correct Answer:
B: O (NLogN)
Explanation:
what is the time complexity of Huffman Coding? Correct Answer O (NLogN) The time complexity of the Huffman algorithm is O(nlogn). Using a heap to store the weight of each tree, each iteration requires O(logn) time to determine the cheapest weight and insert the new weight. There are O(n) iterations, one for each item.
which function overloads the>> operator?
Correct Answer:
D: None of these
Explanation:
which function overloads the>> operator? Correct Answer None of these Operator Overloading means giving extended meaning beyond their predefined operational meaning. For example operator + is used to add two integers as well as join two strings and merge two lists. It is achievable because ' + ' operator is overloaded by int class and str class.
which of these is not a core data type?
Correct Answer:
C: Class
Explanation:
which of these is not a core data type? Correct Answer Class Class is a user - defined data type.
Which of the following function convert a string to a float in python ?
Correct Answer:
B: float (x)
Explanation:
Which of the following function convert a string to a float in python ? Correct Answer float (x) float(x) − Converts x to a floating - point number.
which of the following will produce an answer that is closest in value to a double , d. while not being greater than d?
Correct Answer:
D: (int)Math.Floor(d);
Explanation:
which of the following will produce an answer that is closest in value to a double , d. while not being greater than d? Correct Answer (int)Math.Floor(d); Description The method floor gives the largest integer that is less than or equal to the argument. Syntax This method has the following variants − double floor(double d) double floor(float f) Parameters Here is the detail of parameters − A double or float primitive data type. Return Value This method returns the largest integer that is less than or equal to the argument. Returned as a double. Example Live Demo public class Test { public static void main(String args) { double d = - 100.675; float f = - 90; System.out.println(Math.floor(d)); System.out.println(Math.floor(f)); System.out.println(Math.ceil(d)); System.out.println(Math.ceil(f)); } } This will produce the following result − Output - 101.0 - 90.0 - 100.0 - 90.0
which of the declaration is correct ?
Correct Answer:
A: Int length,
Explanation:
which of the declaration is correct ? Correct Answer Int length, int length = String.valueOf(number).length();
which operator is used to declare the destructor in C++ ?
Correct Answer:
B: ~
Explanation:
which operator is used to declare the destructor in C++ ? Correct Answer ~ A destructor is a member function that is invoked automatically when the object goes out of scope or is explicitly destroyed by a call to delete. A destructor has the same name as the class, preceded by a tilde (~). For example, the destructor for class String is declared: ~String().
which alternative can replace the throw statement in C++ ?
Correct Answer:
C: return
Explanation:
which alternative can replace the throw statement in C++ ? Correct Answer return Throw and return does the same job as return a value . so it can be replaced .
what type of reference should be used in vector arithmetic in C++ =?
Correct Answer:
C: both dynamic & const
Explanation:
what type of reference should be used in vector arithmetic in C++ =? Correct Answer both dynamic & const As we are using the vector and it will give accurate result if we use const reference .
which of the following is an incorrect statement about packages?
Correct Answer:
D: A package can be renamed without renaming the directory in which the classes are stored.
Explanation:
which of the following is an incorrect statement about packages? Correct Answer A package can be renamed without renaming the directory in which the classes are stored. A package can be renamed only after renaming the directory in which the classes are stored.
which of the following statements is the negation of the statements '4 is odd or -9 is positive'?
Correct Answer:
C: 4 is even and - 9 is negative
why do we need to handle exceptions?
Correct Answer:
C: To avoid syntax errors
Explanation:
why do we need to handle exceptions? Correct Answer To avoid syntax errors The exceptions should be handled to prevent any abnormal termination of a program. The program should keep running even if it gets interrupted in between.
How to access the overridden method of base class from the derived class?
Correct Answer:
C: using scope resolution operator
Explanation:
How to access the overridden method of base class from the derived class? Correct Answer using scope resolution operator Scope resolution operator :: can be used to access the base class method even if overridden. To access those, first base class name should be written followed by the scope resolution operator and then the method name.
Int C = 10 , system out println (C-) , gives a output of
Correct Answer:
A: 10
Explanation:
Int C = 10 , system out println (C-) , gives a output of Correct Answer 10 এখানে C একটি ভেরিএবল যার ডেটাটাইপ হলো int বা পূর্ণসংখ্যা এবং এর value হলো 10 এখন প্রিন্ট কমান্ডে printf(c - - ) বয়বহৃত হয়েছে এর মানে আমরা output এ 10 ই দেখব।। c - - এর অর্থ প্রথমে c এর মান 10 Print করবে পরে 1 বিয়োগ করবে। আর - - c এর মানে প্রথমে - 1 তারপর C এর value অর্থাৎ যদি - - C থাকত তাহলে 9 print হত।
Suppose a C program has floating constant 1.414, what's the best way to convert this as 'float' data type?
Correct Answer:
C: 1,414f or 1.414 F
Explanation:
Suppose a C program has floating constant 1.414, what's the best way to convert this as 'float' data type? Correct Answer 1,414f or 1.414 F #include "stdio.h" int main() { printf("%d %d",sizeof(3.14F), sizeof(3.14L)); return 0; } Output: 4 16 উল্লেখ্য, Float এবং Integer Data Type এর জন্য কম্পিউটারে 4 Byte জায়গা প্রয়োজন। এছাড়া, Long Data Type এর জন্য 16 Byte জায়গা প্রয়োজন।
Consider the following variable declarations and definations in C . (i) int var _ 9 =1 ; (ii) int 9 _ var =2; (iii) int + =3; Choose the correct statement w.r.t above variables.
Correct Answer:
C: Both i. & iii. are valid
Explanation:
Consider the following variable declarations and definations in C . (i) int var _ 9 =1 ; (ii) int 9 _ var =2; (iii) int + =3; Choose the correct statement w.r.t above variables. Correct Answer Both i. & iii. are valid In C language, a variable name can consist of letters, digits and underscore i.e. _ . But a variable name has to start with either letter or underscore. It can't start with a digit. So valid variables are var_9 and _ from the above question. Even two back to back underscore i.e. __ is also a valid variable name. Even _9 is a valid variable. But 9var and 9_ are invalid variables in C.
For a given integer, which of the following operators can be used to 'Set' and 'reset ' a particular bit respectively?
Correct Answer:
A: I and &
what is an example of iteration in C?
Correct Answer:
D: all of the above
Explanation:
what is an example of iteration in C? Correct Answer all of the above একই কাজ (Operation) বারবার করার জন্য সি প্রোগ্রামিং ল্যাঙ্গুয়েজ - এ বিভিন্ন ফাংশন ব্যবহার করা হয় যার মধ্যে For loop, do... while statement, if… else statement উল্লেখযোগ্য।
How many time the following for loop will be executed ? unsigned int i for ( i=100; i > = 0, i --) printf ("%d", i)
Correct Answer:
B: 100
What is the process of defining two or more methods within the same class that have same name but different parameters declaration?
Correct Answer:
B: method overloading
Which of the following is a valid declaration of an object of class Box?
Correct Answer:
A: "Box obhj -new BOx();"
Which of the following is a correct format for declaration of function?
Correct Answer:
A: "return-type function name (argument type;)"
Which of the following doesn't requirement an & for the input in Scant()?
Correct Answer:
A: "char name [10]."
Virtual memory consists of __ .
Correct Answer:
A: Static RAM
Explanation:
Virtual memory consists of __ . Correct Answer Static RAM Static RAM এর সমন্বয়ে virtual memory গঠিত।
The expression x+3 is______
Correct Answer:
A: one variable
Explanation:
The expression x+3 is______ Correct Answer one variable x + 3 রাশিতে একটি মাত্র চলক x রয়েছে।
Which one of the following is a loop construct that will always be executed be execited once?
Correct Answer:
D: do while
The delay that occurs between the time a check is written and the money is deducted from the client's account is known as-
Correct Answer:
C: float