Saturday, 16 January 2016

Shot notes for C programming


Short notes on C Programming
1.       What the name of the symbol  “ = “ ?
      Ans: The name of the symbol of  “  = “ is assignment statement.

2.       What is the function of Assignment statement?
       Ans: The function of assignment statement ( i.e. “=”)  is to store the value of the right side variable to the left side variable.
       DËit Assignment statement -Gi KvR nj, Wvb cv‡k¦©i †Kvb variable Gi †h‡Kv‡bv  value evg cv‡k¦©i ‡Kvb variable -G Rgv Kiv|

3.       What do you mean by statement?
        Ans: a simple instruction or command to the computer which is used to do something by the computer is called statement.
         DËit ‡h †QvÆ †QvÆ ûKzg Øviv Computer-†K w`‡q KvR Kiv‡bv nq Zv‡K statement e‡j|

4.       `ywU statement wK wKfv‡e Avjv`v Kiv nq?
           Ans: We can separate two statements by a semicolon (;)

5.       Where a semicolon can not be used?
     Ans: if ev ‡h †Kvb loop – Gi c‡i semicolon(;) emv‡bv hv‡e bv|

6.       What do you mean by string constant?
     DËit ‡Kvb kã ev jvB‡bi `yB cv‡k¦© Wej †Kv‡Ukb _vK‡j †mwU †K string constant wn‡m‡e aiv nq|      
7.        What do you mean by variable?
       Ans: A memory space in the Hard disk where we can store a value.
8.        How can you give a name (bvg Ki‡Yi wbqg) of a variable?
           Ans:  We can give a name of a variable in 4 conditions.
(i) Only character, digit and underscore can be used.
                   (ii) Must start with a character.
                  (iii) Blank space is not allowed in the middle of a variable.  
                  (iv) You can use maximum 8 characters.

9.       What is the meaning of the statement “k  =  3;” ?
           Ans: k – Gi wfZi 3 Rgv n‡q hvI|

10.  What is the function of printf() function?
      DËit Bnvi gyj KvR nj gwbU‡i †Kvb Z_¨ †`Lv‡bv| Bnv wZb fv‡e †Kvb Z_¨ gwbU‡i †`Lv‡Z cv‡i| h_vt (i) String constant (ii) value of a variable (iii) String constant and value of a variable at the same time.
(i)                            String constant: printf() – Gi wfZi †Kvb kã e jvB‡bi `yB cv‡k¦© †Kvb double quotation _vK‡j †m wU hv Av‡Q wVK AweKj ZvB monitor-G show K‡i| wKšZz
(ii)                         Value of a variable: ‡Kvb k‡ãi `yB cv‡k¦© †Kvb double quotation bv _vK‡j †mwU variable wn‡m‡e a‡i Dnvi wfZ‡i †h value _‡K †mwU monitor-G show K‡i|
(iii)                       String constant + Value of a variable at the same time.
11.  What will be the output of the following statement?
(i)                            printf(“I live in Bangladesh”);  Output: I live in Bangladesh
(ii)                         suppose k = 3; printf(“%d”,k);  Output: 3
(iii)                       suppose p = 3; printf(“T = %d”,p); Output :  T = 3
         
12.  What is the function of scanf() function?
      DËit Bnvi gyj KvR nj key board ‡_‡K †Kvb value c‡o ev scan K‡i scanf() - Gi parameter Gi wfZi store Kiv |

13.   What is the meaning the following scanf() statement?scanf(“%d”,&abul) – Gi A_© nj †h value wU key board †_‡K †`Iqv n‡e †mwU Bnvi parameter variable (GLv‡b abul) Gi wfZi interger wn‡m‡e store Ki‡e|

(i)                            scanf(“%f”,&abul) – Gi A_© nj †h value wU key board †_‡K †`Iqv n‡e †mwU Bnvi parameter variable (GLv‡b abul) Gi wfZi float wn‡m‡e store Ki‡e|

No comments:

Post a Comment