SlideShare a Scribd company logo
1 of 3
Download to read offline
Dezyne E’Cole College, Ajmer




                                 B.C.A (Part 1) Examination, 2013
                          Fundamental of C Programming
1. What will be the output of the following code
         int x=40000;

             printf (“%d”, x);

Ans: Garbage value

2. Arrange following operators in ascending order according to their precedence.
       a. &&
       b. ||
       c. !
       d. ? :
       e. & (Bitwise)

Ans: !,    &,           &&,      ||,       ?:

3. What will be the output of following code for

    (i=1, j=10; i<6; ++i, j--)

    printf (“%d %d”, i, j);

Ans:
             I      J
            1 10

            2      9

            3      8

            4      7

            5      6

4. What is the meaning of

    int (*P)[10];

Ans: P, Array of pointer (10 values)

5. What is the meaning of

    int *P [10];

Ans: P, 10 array of pointer, that stores 10 different addresses.

6. Find errors (if any) and remove them otherwise give output of the following
Dezyne E’Cole College, Ajmer



          Char C=’A’;

          int x=10, y;

          y=x+c;

          putchar(y);

Ans:      char C=’A’;

          int x=10,y;

          y=x+C;

          putchar(y);

          Output: K



   7. Find errors and remove them (if any) otherwise give output of the following

          printf(“%d”,++5);

       Ans: printf(“%d”,5);

          output: 5

   8. Find errors and remove them (if any) otherwise give output of the following

          printf[“%d”,sizeof(“”)];

       Ans: printf(“%d”,sizeof(“”));

          output: 1

   9. What will be the output of the following:

          int x=10, y=20;

          (x>y)? ++x: ++y;

          printf(“n x=%d, y=%d”,x,y);

       Ans: x=10, y=21

   10. if student structure is given as

          struct student

          {

                   char name[10];
Dezyne E’Cole College, Ajmer



             int E;

             int H;

             int M;

   }*pstu;

   then allocate memory to pstu pointer.

Ans: pstu= (student*) malloc (sizeof (student));

More Related Content

What's hot

Chapter 5 exercises Balagurusamy Programming ANSI in c
Chapter 5 exercises Balagurusamy Programming ANSI  in cChapter 5 exercises Balagurusamy Programming ANSI  in c
Chapter 5 exercises Balagurusamy Programming ANSI in cBUBT
 
Intro to c programming
Intro to c programmingIntro to c programming
Intro to c programmingPrabhu Govind
 
Creative Coding 1 - 2 Variables
Creative Coding 1 - 2 VariablesCreative Coding 1 - 2 Variables
Creative Coding 1 - 2 VariablesTill Nagel
 
Chapter 4 : Balagurusamy Programming ANSI in C
Chapter 4 : Balagurusamy Programming ANSI in CChapter 4 : Balagurusamy Programming ANSI in C
Chapter 4 : Balagurusamy Programming ANSI in CBUBT
 
Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C BUBT
 
Programming fundamentals
Programming fundamentalsProgramming fundamentals
Programming fundamentalsZaibi Gondal
 
Benginning Calculus Lecture notes 9 - derivative functions
Benginning Calculus Lecture notes 9 - derivative functionsBenginning Calculus Lecture notes 9 - derivative functions
Benginning Calculus Lecture notes 9 - derivative functionsbasyirstar
 
(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2Pamidimukkala Sivani
 
Chapter 6 Balagurusamy Programming ANSI in c
Chapter 6  Balagurusamy Programming ANSI  in cChapter 6  Balagurusamy Programming ANSI  in c
Chapter 6 Balagurusamy Programming ANSI in cBUBT
 
Lab 9 sem ii_12_13
Lab 9 sem ii_12_13Lab 9 sem ii_12_13
Lab 9 sem ii_12_13alish sha
 
Benginning Calculus Lecture notes 6 - implicit differentiation
Benginning Calculus Lecture notes 6 - implicit differentiationBenginning Calculus Lecture notes 6 - implicit differentiation
Benginning Calculus Lecture notes 6 - implicit differentiationbasyirstar
 
Lab 10 sem ii_12_13
Lab 10 sem ii_12_13Lab 10 sem ii_12_13
Lab 10 sem ii_12_13alish sha
 
Chapter 2 : Balagurusamy_ Programming ANsI in C
Chapter 2 :  Balagurusamy_ Programming ANsI in CChapter 2 :  Balagurusamy_ Programming ANsI in C
Chapter 2 : Balagurusamy_ Programming ANsI in CBUBT
 
The solution manual of c by robin
The solution manual of c by robinThe solution manual of c by robin
The solution manual of c by robinAbdullah Al Naser
 
Core programming in c
Core programming in cCore programming in c
Core programming in cRahul Pandit
 
Benginning Calculus Lecture notes 3 - derivatives
Benginning Calculus Lecture notes 3 - derivativesBenginning Calculus Lecture notes 3 - derivatives
Benginning Calculus Lecture notes 3 - derivativesbasyirstar
 

What's hot (20)

Chapter 5 exercises Balagurusamy Programming ANSI in c
Chapter 5 exercises Balagurusamy Programming ANSI  in cChapter 5 exercises Balagurusamy Programming ANSI  in c
Chapter 5 exercises Balagurusamy Programming ANSI in c
 
Intro to c programming
Intro to c programmingIntro to c programming
Intro to c programming
 
Creative Coding 1 - 2 Variables
Creative Coding 1 - 2 VariablesCreative Coding 1 - 2 Variables
Creative Coding 1 - 2 Variables
 
Chapter 4 : Balagurusamy Programming ANSI in C
Chapter 4 : Balagurusamy Programming ANSI in CChapter 4 : Balagurusamy Programming ANSI in C
Chapter 4 : Balagurusamy Programming ANSI in C
 
Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C Chapter 3 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C
 
Programming fundamentals
Programming fundamentalsProgramming fundamentals
Programming fundamentals
 
Benginning Calculus Lecture notes 9 - derivative functions
Benginning Calculus Lecture notes 9 - derivative functionsBenginning Calculus Lecture notes 9 - derivative functions
Benginning Calculus Lecture notes 9 - derivative functions
 
(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2
 
Matlab code for secant method
Matlab code for secant methodMatlab code for secant method
Matlab code for secant method
 
Chapter 6 Balagurusamy Programming ANSI in c
Chapter 6  Balagurusamy Programming ANSI  in cChapter 6  Balagurusamy Programming ANSI  in c
Chapter 6 Balagurusamy Programming ANSI in c
 
Lab 9 sem ii_12_13
Lab 9 sem ii_12_13Lab 9 sem ii_12_13
Lab 9 sem ii_12_13
 
Benginning Calculus Lecture notes 6 - implicit differentiation
Benginning Calculus Lecture notes 6 - implicit differentiationBenginning Calculus Lecture notes 6 - implicit differentiation
Benginning Calculus Lecture notes 6 - implicit differentiation
 
C exam
C examC exam
C exam
 
Lab 10 sem ii_12_13
Lab 10 sem ii_12_13Lab 10 sem ii_12_13
Lab 10 sem ii_12_13
 
Chapter 2 : Balagurusamy_ Programming ANsI in C
Chapter 2 :  Balagurusamy_ Programming ANsI in CChapter 2 :  Balagurusamy_ Programming ANsI in C
Chapter 2 : Balagurusamy_ Programming ANsI in C
 
ICP - Lecture 5
ICP - Lecture 5ICP - Lecture 5
ICP - Lecture 5
 
Lab 6
Lab 6Lab 6
Lab 6
 
The solution manual of c by robin
The solution manual of c by robinThe solution manual of c by robin
The solution manual of c by robin
 
Core programming in c
Core programming in cCore programming in c
Core programming in c
 
Benginning Calculus Lecture notes 3 - derivatives
Benginning Calculus Lecture notes 3 - derivativesBenginning Calculus Lecture notes 3 - derivatives
Benginning Calculus Lecture notes 3 - derivatives
 

Viewers also liked

Vartika Khandelwal MSc-ID
Vartika Khandelwal MSc-ID Vartika Khandelwal MSc-ID
Vartika Khandelwal MSc-ID dezyneecole
 
Critical thinking argumentation - lucy ohanyan a
Critical thinking   argumentation - lucy ohanyan aCritical thinking   argumentation - lucy ohanyan a
Critical thinking argumentation - lucy ohanyan alucyoha
 
C programming (Part 1)
C programming (Part 1)C programming (Part 1)
C programming (Part 1)dezyneecole
 
Ashish sharma(IT Ist Year Student Work)
Ashish sharma(IT Ist Year Student Work)Ashish sharma(IT Ist Year Student Work)
Ashish sharma(IT Ist Year Student Work)dezyneecole
 
“Business Statistics”
“Business Statistics”“Business Statistics”
“Business Statistics”dezyneecole
 
Prateek khurana BSc-ID
Prateek khurana BSc-ID Prateek khurana BSc-ID
Prateek khurana BSc-ID dezyneecole
 
Heena shrivastav MSc.-FT
Heena shrivastav MSc.-FT Heena shrivastav MSc.-FT
Heena shrivastav MSc.-FT dezyneecole
 
Aditi karwa MSc.-FT
Aditi karwa MSc.-FTAditi karwa MSc.-FT
Aditi karwa MSc.-FTdezyneecole
 
Jagdish prasad sharma(IT Ist Year Work)
Jagdish prasad sharma(IT Ist Year Work)Jagdish prasad sharma(IT Ist Year Work)
Jagdish prasad sharma(IT Ist Year Work)dezyneecole
 
Ankita jajoo BSc-ID work
Ankita jajoo  BSc-ID work Ankita jajoo  BSc-ID work
Ankita jajoo BSc-ID work dezyneecole
 
Vartika khandelwal MSc-ID
Vartika khandelwal MSc-IDVartika khandelwal MSc-ID
Vartika khandelwal MSc-IDdezyneecole
 
Jyoti phulwani BSc-ID
Jyoti phulwani BSc-ID Jyoti phulwani BSc-ID
Jyoti phulwani BSc-ID dezyneecole
 
Jyoti Phulwani BSc ID Work
Jyoti Phulwani BSc ID WorkJyoti Phulwani BSc ID Work
Jyoti Phulwani BSc ID Workdezyneecole
 
Bba students working
Bba students workingBba students working
Bba students workingdezyneecole
 
Gazal & chanchal
Gazal & chanchalGazal & chanchal
Gazal & chanchaldezyneecole
 

Viewers also liked (18)

MICRO ECONOMICS
MICRO ECONOMICSMICRO ECONOMICS
MICRO ECONOMICS
 
Vartika Khandelwal MSc-ID
Vartika Khandelwal MSc-ID Vartika Khandelwal MSc-ID
Vartika Khandelwal MSc-ID
 
Critical thinking argumentation - lucy ohanyan a
Critical thinking   argumentation - lucy ohanyan aCritical thinking   argumentation - lucy ohanyan a
Critical thinking argumentation - lucy ohanyan a
 
C programming (Part 1)
C programming (Part 1)C programming (Part 1)
C programming (Part 1)
 
Ashish sharma(IT Ist Year Student Work)
Ashish sharma(IT Ist Year Student Work)Ashish sharma(IT Ist Year Student Work)
Ashish sharma(IT Ist Year Student Work)
 
“Business Statistics”
“Business Statistics”“Business Statistics”
“Business Statistics”
 
Prateek khurana BSc-ID
Prateek khurana BSc-ID Prateek khurana BSc-ID
Prateek khurana BSc-ID
 
Heena shrivastav MSc.-FT
Heena shrivastav MSc.-FT Heena shrivastav MSc.-FT
Heena shrivastav MSc.-FT
 
Aditi karwa MSc.-FT
Aditi karwa MSc.-FTAditi karwa MSc.-FT
Aditi karwa MSc.-FT
 
Jagdish prasad sharma(IT Ist Year Work)
Jagdish prasad sharma(IT Ist Year Work)Jagdish prasad sharma(IT Ist Year Work)
Jagdish prasad sharma(IT Ist Year Work)
 
MICRO ECONOMICS
MICRO ECONOMICSMICRO ECONOMICS
MICRO ECONOMICS
 
Alocmey
AlocmeyAlocmey
Alocmey
 
Ankita jajoo BSc-ID work
Ankita jajoo  BSc-ID work Ankita jajoo  BSc-ID work
Ankita jajoo BSc-ID work
 
Vartika khandelwal MSc-ID
Vartika khandelwal MSc-IDVartika khandelwal MSc-ID
Vartika khandelwal MSc-ID
 
Jyoti phulwani BSc-ID
Jyoti phulwani BSc-ID Jyoti phulwani BSc-ID
Jyoti phulwani BSc-ID
 
Jyoti Phulwani BSc ID Work
Jyoti Phulwani BSc ID WorkJyoti Phulwani BSc ID Work
Jyoti Phulwani BSc ID Work
 
Bba students working
Bba students workingBba students working
Bba students working
 
Gazal & chanchal
Gazal & chanchalGazal & chanchal
Gazal & chanchal
 

Similar to C programming

C interview question answer 2
C interview question answer 2C interview question answer 2
C interview question answer 2Amit Kapoor
 
LET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERSLET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERSKavyaSharma65
 
C aptitude.2doc
C aptitude.2docC aptitude.2doc
C aptitude.2docSrikanth
 
Let us C (by yashvant Kanetkar) chapter 3 Solution
Let us C   (by yashvant Kanetkar) chapter 3 SolutionLet us C   (by yashvant Kanetkar) chapter 3 Solution
Let us C (by yashvant Kanetkar) chapter 3 SolutionHazrat Bilal
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomeshpraveensomesh
 
C tech questions
C tech questionsC tech questions
C tech questionsvijay00791
 
Basic C Programming Lab Practice
Basic C Programming Lab PracticeBasic C Programming Lab Practice
Basic C Programming Lab PracticeMahmud Hasan Tanvir
 
Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1Dr. Loganathan R
 
C multiple choice questions and answers pdf
C multiple choice questions and answers pdfC multiple choice questions and answers pdf
C multiple choice questions and answers pdfchoconyeuquy
 
Qust & ans inc
Qust & ans incQust & ans inc
Qust & ans incnayakq
 
introduction to c programming and C History.pptx
introduction to c programming and C History.pptxintroduction to c programming and C History.pptx
introduction to c programming and C History.pptxManojKhadilkar1
 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solutionAzhar Javed
 
Srinivas Reddy Amedapu, CPDS, CP Lab, JNTU Hyderabad
Srinivas Reddy Amedapu, CPDS, CP Lab, JNTU HyderabadSrinivas Reddy Amedapu, CPDS, CP Lab, JNTU Hyderabad
Srinivas Reddy Amedapu, CPDS, CP Lab, JNTU HyderabadSrinivas Reddy Amedapu
 
Srinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
Srinivas Reddy Amedapu C and Data Structures JNTUH HyderabadSrinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
Srinivas Reddy Amedapu C and Data Structures JNTUH HyderabadSrinivas Reddy Amedapu
 
Cse 121 presentation on matrix [autosaved]
Cse 121 presentation on matrix [autosaved]Cse 121 presentation on matrix [autosaved]
Cse 121 presentation on matrix [autosaved]Kanis Fatema Shanta
 

Similar to C programming (20)

C interview question answer 2
C interview question answer 2C interview question answer 2
C interview question answer 2
 
LET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERSLET US C (5th EDITION) CHAPTER 2 ANSWERS
LET US C (5th EDITION) CHAPTER 2 ANSWERS
 
C aptitude.2doc
C aptitude.2docC aptitude.2doc
C aptitude.2doc
 
Captitude 2doc-100627004318-phpapp01
Captitude 2doc-100627004318-phpapp01Captitude 2doc-100627004318-phpapp01
Captitude 2doc-100627004318-phpapp01
 
Let us C (by yashvant Kanetkar) chapter 3 Solution
Let us C   (by yashvant Kanetkar) chapter 3 SolutionLet us C   (by yashvant Kanetkar) chapter 3 Solution
Let us C (by yashvant Kanetkar) chapter 3 Solution
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomesh
 
C Programs.pptx
C Programs.pptxC Programs.pptx
C Programs.pptx
 
C tech questions
C tech questionsC tech questions
C tech questions
 
Basic C Programming Lab Practice
Basic C Programming Lab PracticeBasic C Programming Lab Practice
Basic C Programming Lab Practice
 
Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1Bcsl 033 data and file structures lab s1-1
Bcsl 033 data and file structures lab s1-1
 
C multiple choice questions and answers pdf
C multiple choice questions and answers pdfC multiple choice questions and answers pdf
C multiple choice questions and answers pdf
 
Qust & ans inc
Qust & ans incQust & ans inc
Qust & ans inc
 
C Programming Example
C Programming ExampleC Programming Example
C Programming Example
 
BCSL 058 solved assignment
BCSL 058 solved assignmentBCSL 058 solved assignment
BCSL 058 solved assignment
 
introduction to c programming and C History.pptx
introduction to c programming and C History.pptxintroduction to c programming and C History.pptx
introduction to c programming and C History.pptx
 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solution
 
2D array
2D array2D array
2D array
 
Srinivas Reddy Amedapu, CPDS, CP Lab, JNTU Hyderabad
Srinivas Reddy Amedapu, CPDS, CP Lab, JNTU HyderabadSrinivas Reddy Amedapu, CPDS, CP Lab, JNTU Hyderabad
Srinivas Reddy Amedapu, CPDS, CP Lab, JNTU Hyderabad
 
Srinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
Srinivas Reddy Amedapu C and Data Structures JNTUH HyderabadSrinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
Srinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
 
Cse 121 presentation on matrix [autosaved]
Cse 121 presentation on matrix [autosaved]Cse 121 presentation on matrix [autosaved]
Cse 121 presentation on matrix [autosaved]
 

More from dezyneecole

Dezyne E'cole College
Dezyne E'cole CollegeDezyne E'cole College
Dezyne E'cole Collegedezyneecole
 
Dezyne E'cole College
Dezyne E'cole CollegeDezyne E'cole College
Dezyne E'cole Collegedezyneecole
 
Dezyne E'cole College
Dezyne E'cole CollegeDezyne E'cole College
Dezyne E'cole Collegedezyneecole
 
Dezyne E'cole College
Dezyne E'cole CollegeDezyne E'cole College
Dezyne E'cole Collegedezyneecole
 
Vartika khandelwal
Vartika khandelwalVartika khandelwal
Vartika khandelwaldezyneecole
 
Ankita gupta assignments ppt
Ankita gupta assignments pptAnkita gupta assignments ppt
Ankita gupta assignments pptdezyneecole
 
ankita gupta work
ankita gupta workankita gupta work
ankita gupta workdezyneecole
 
Vartika khandelwal
Vartika khandelwalVartika khandelwal
Vartika khandelwaldezyneecole
 
Ankita gupta work
Ankita gupta workAnkita gupta work
Ankita gupta workdezyneecole
 
Counter design 1
Counter design 1Counter design 1
Counter design 1dezyneecole
 
Vicky tulsiani counter design final assignments copy
Vicky tulsiani counter design final assignments   copyVicky tulsiani counter design final assignments   copy
Vicky tulsiani counter design final assignments copydezyneecole
 
interior design MSc. I sem. student work
interior design MSc. I sem. student workinterior design MSc. I sem. student work
interior design MSc. I sem. student workdezyneecole
 
Design devlopment
Design devlopmentDesign devlopment
Design devlopmentdezyneecole
 
BBA-II Year Students Work
BBA-II Year Students WorkBBA-II Year Students Work
BBA-II Year Students Workdezyneecole
 
Yogita Motiramani MSc.FT
Yogita Motiramani MSc.FTYogita Motiramani MSc.FT
Yogita Motiramani MSc.FTdezyneecole
 
Ankita jajoo b sc id student work
Ankita jajoo b sc id student workAnkita jajoo b sc id student work
Ankita jajoo b sc id student workdezyneecole
 
Kanchana Bhatia
Kanchana Bhatia Kanchana Bhatia
Kanchana Bhatia dezyneecole
 
Lokeshwari ajmera project 1(IT Ist Year Work)
Lokeshwari ajmera project 1(IT Ist Year Work)Lokeshwari ajmera project 1(IT Ist Year Work)
Lokeshwari ajmera project 1(IT Ist Year Work)dezyneecole
 

More from dezyneecole (19)

Dezyne E'cole College
Dezyne E'cole CollegeDezyne E'cole College
Dezyne E'cole College
 
Dezyne E'cole College
Dezyne E'cole CollegeDezyne E'cole College
Dezyne E'cole College
 
Dezyne E'cole College
Dezyne E'cole CollegeDezyne E'cole College
Dezyne E'cole College
 
Dezyne E'cole College
Dezyne E'cole CollegeDezyne E'cole College
Dezyne E'cole College
 
Vartika khandelwal
Vartika khandelwalVartika khandelwal
Vartika khandelwal
 
Ankita gupta assignments ppt
Ankita gupta assignments pptAnkita gupta assignments ppt
Ankita gupta assignments ppt
 
ankita gupta work
ankita gupta workankita gupta work
ankita gupta work
 
Vartika khandelwal
Vartika khandelwalVartika khandelwal
Vartika khandelwal
 
Ankita gupta work
Ankita gupta workAnkita gupta work
Ankita gupta work
 
Counter design 1
Counter design 1Counter design 1
Counter design 1
 
Vicky tulsiani counter design final assignments copy
Vicky tulsiani counter design final assignments   copyVicky tulsiani counter design final assignments   copy
Vicky tulsiani counter design final assignments copy
 
interior design MSc. I sem. student work
interior design MSc. I sem. student workinterior design MSc. I sem. student work
interior design MSc. I sem. student work
 
Interior design
Interior designInterior design
Interior design
 
Design devlopment
Design devlopmentDesign devlopment
Design devlopment
 
BBA-II Year Students Work
BBA-II Year Students WorkBBA-II Year Students Work
BBA-II Year Students Work
 
Yogita Motiramani MSc.FT
Yogita Motiramani MSc.FTYogita Motiramani MSc.FT
Yogita Motiramani MSc.FT
 
Ankita jajoo b sc id student work
Ankita jajoo b sc id student workAnkita jajoo b sc id student work
Ankita jajoo b sc id student work
 
Kanchana Bhatia
Kanchana Bhatia Kanchana Bhatia
Kanchana Bhatia
 
Lokeshwari ajmera project 1(IT Ist Year Work)
Lokeshwari ajmera project 1(IT Ist Year Work)Lokeshwari ajmera project 1(IT Ist Year Work)
Lokeshwari ajmera project 1(IT Ist Year Work)
 

C programming

  • 1. Dezyne E’Cole College, Ajmer B.C.A (Part 1) Examination, 2013 Fundamental of C Programming 1. What will be the output of the following code int x=40000; printf (“%d”, x); Ans: Garbage value 2. Arrange following operators in ascending order according to their precedence. a. && b. || c. ! d. ? : e. & (Bitwise) Ans: !, &, &&, ||, ?: 3. What will be the output of following code for (i=1, j=10; i<6; ++i, j--) printf (“%d %d”, i, j); Ans: I J 1 10 2 9 3 8 4 7 5 6 4. What is the meaning of int (*P)[10]; Ans: P, Array of pointer (10 values) 5. What is the meaning of int *P [10]; Ans: P, 10 array of pointer, that stores 10 different addresses. 6. Find errors (if any) and remove them otherwise give output of the following
  • 2. Dezyne E’Cole College, Ajmer Char C=’A’; int x=10, y; y=x+c; putchar(y); Ans: char C=’A’; int x=10,y; y=x+C; putchar(y); Output: K 7. Find errors and remove them (if any) otherwise give output of the following printf(“%d”,++5); Ans: printf(“%d”,5); output: 5 8. Find errors and remove them (if any) otherwise give output of the following printf[“%d”,sizeof(“”)]; Ans: printf(“%d”,sizeof(“”)); output: 1 9. What will be the output of the following: int x=10, y=20; (x>y)? ++x: ++y; printf(“n x=%d, y=%d”,x,y); Ans: x=10, y=21 10. if student structure is given as struct student { char name[10];
  • 3. Dezyne E’Cole College, Ajmer int E; int H; int M; }*pstu; then allocate memory to pstu pointer. Ans: pstu= (student*) malloc (sizeof (student));