SlideShare a Scribd company logo
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 c
BUBT
 
Intro to c programming
Intro to c programmingIntro to c programming
Intro to c programming
Prabhu Govind
 
Creative Coding 1 - 2 Variables
Creative Coding 1 - 2 VariablesCreative Coding 1 - 2 Variables
Creative Coding 1 - 2 Variables
Till 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 C
BUBT
 
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 fundamentals
Zaibi 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 functions
basyirstar
 
(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
Pamidimukkala Sivani
 
Matlab code for secant method
Matlab code for secant methodMatlab code for secant method
Matlab code for secant method
Taimoor Muzaffar Gondal
 
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
BUBT
 
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
basyirstar
 
Lab 9 sem ii_12_13
Lab 9 sem ii_12_13Lab 9 sem ii_12_13
Lab 9 sem ii_12_13
alish sha
 
C exam
C examC exam
Lab 10 sem ii_12_13
Lab 10 sem ii_12_13Lab 10 sem ii_12_13
Lab 10 sem ii_12_13
alish 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 C
BUBT
 
ICP - Lecture 5
ICP - Lecture 5ICP - Lecture 5
ICP - Lecture 5
Hassaan Rahman
 
Lab 6
Lab 6Lab 6
Lab 6
alish sha
 
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
Abdullah Al Naser
 
Core programming in c
Core programming in cCore programming in c
Core programming in c
Rahul Pandit
 
Benginning Calculus Lecture notes 3 - derivatives
Benginning Calculus Lecture notes 3 - derivativesBenginning Calculus Lecture notes 3 - derivatives
Benginning Calculus Lecture notes 3 - derivatives
basyirstar
 

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
 
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
 
Lab 9 sem ii_12_13
Lab 9 sem ii_12_13Lab 9 sem ii_12_13
Lab 9 sem ii_12_13
 
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

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
 
Alexander Rybak PPP Slideshow
Alexander Rybak PPP SlideshowAlexander Rybak PPP Slideshow
Alexander Rybak PPP Slideshow
Alexander Rybak
 
23377494 makalah
23377494 makalah23377494 makalah
23377494 makalah
Operator Warnet Vast Raha
 
Macmohan’s 1981
Macmohan’s 1981Macmohan’s 1981
Macmohan’s 1981
Mrinmoy Bharadwaz
 
MICRO ECONOMICS
MICRO ECONOMICSMICRO ECONOMICS
MICRO ECONOMICS
dezyneecole
 
Presentation Sauer Automation
Presentation Sauer AutomationPresentation Sauer Automation
Presentation Sauer Automation
Marcelo Sauer
 
Freemium mobile games
Freemium mobile gamesFreemium mobile games
Freemium mobile games
Alexander Rybak
 
opportunities and risk of e-banking
opportunities and risk of e-bankingopportunities and risk of e-banking
opportunities and risk of e-banking
Jasna3134
 
The Comprehension Toolkit
The Comprehension ToolkitThe Comprehension Toolkit
The Comprehension Toolkit
graeme
 
Al quran16lines
Al quran16linesAl quran16lines
Al quran16lines
Ek Mûsafîr
 
Feliz navidad Iriarte
Feliz navidad IriarteFeliz navidad Iriarte
Feliz navidad Iriarte
inesantonia1956
 
اجابات درس افاق مستقبلية و اسئلة الوحدة للصف العاشر
اجابات درس افاق مستقبلية  و اسئلة الوحدة للصف العاشراجابات درس افاق مستقبلية  و اسئلة الوحدة للصف العاشر
اجابات درس افاق مستقبلية و اسئلة الوحدة للصف العاشر
Haneen Droubi
 

Viewers also liked (12)

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)
 
Alexander Rybak PPP Slideshow
Alexander Rybak PPP SlideshowAlexander Rybak PPP Slideshow
Alexander Rybak PPP Slideshow
 
23377494 makalah
23377494 makalah23377494 makalah
23377494 makalah
 
Macmohan’s 1981
Macmohan’s 1981Macmohan’s 1981
Macmohan’s 1981
 
MICRO ECONOMICS
MICRO ECONOMICSMICRO ECONOMICS
MICRO ECONOMICS
 
Presentation Sauer Automation
Presentation Sauer AutomationPresentation Sauer Automation
Presentation Sauer Automation
 
Freemium mobile games
Freemium mobile gamesFreemium mobile games
Freemium mobile games
 
opportunities and risk of e-banking
opportunities and risk of e-bankingopportunities and risk of e-banking
opportunities and risk of e-banking
 
The Comprehension Toolkit
The Comprehension ToolkitThe Comprehension Toolkit
The Comprehension Toolkit
 
Al quran16lines
Al quran16linesAl quran16lines
Al quran16lines
 
Feliz navidad Iriarte
Feliz navidad IriarteFeliz navidad Iriarte
Feliz navidad Iriarte
 
اجابات درس افاق مستقبلية و اسئلة الوحدة للصف العاشر
اجابات درس افاق مستقبلية  و اسئلة الوحدة للصف العاشراجابات درس افاق مستقبلية  و اسئلة الوحدة للصف العاشر
اجابات درس افاق مستقبلية و اسئلة الوحدة للصف العاشر
 

Similar to C programming (Part 1)

C interview question answer 2
C interview question answer 2C interview question answer 2
C interview question answer 2
Amit 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 ANSWERS
KavyaSharma65
 
Captitude 2doc-100627004318-phpapp01
Captitude 2doc-100627004318-phpapp01Captitude 2doc-100627004318-phpapp01
Captitude 2doc-100627004318-phpapp01
ManjeeraBhargavi Varanasi
 
C aptitude.2doc
C aptitude.2docC aptitude.2doc
C aptitude.2doc
Srikanth
 
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
Hazrat Bilal
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomesh
praveensomesh
 
C Programs.pptx
C Programs.pptxC Programs.pptx
C Programs.pptx
Geetha657598
 
C tech questions
C tech questionsC tech questions
C tech questions
vijay00791
 
Basic C Programming Lab Practice
Basic C Programming Lab PracticeBasic C Programming Lab Practice
Basic C Programming Lab Practice
Mahmud 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-1
Dr. 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 pdf
choconyeuquy
 
Qust & ans inc
Qust & ans incQust & ans inc
Qust & ans inc
nayakq
 
C Programming Example
C Programming ExampleC Programming Example
C Programming Example
PRATHAMESH DESHPANDE
 
BCSL 058 solved assignment
BCSL 058 solved assignmentBCSL 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
ManojKhadilkar1
 
Chapter 8 c solution
Chapter 8 c solutionChapter 8 c solution
Chapter 8 c solution
Azhar Javed
 
2D array
2D array2D array
2D array
A. S. M. Shafi
 
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
Srinivas Reddy Amedapu
 
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
 
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 (Part 1) (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
 
Captitude 2doc-100627004318-phpapp01
Captitude 2doc-100627004318-phpapp01Captitude 2doc-100627004318-phpapp01
Captitude 2doc-100627004318-phpapp01
 
C aptitude.2doc
C aptitude.2docC aptitude.2doc
C aptitude.2doc
 
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 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
 
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
 
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 College
dezyneecole
 
Dezyne E'cole College
Dezyne E'cole CollegeDezyne E'cole College
Dezyne E'cole College
dezyneecole
 
Dezyne E'cole College
Dezyne E'cole CollegeDezyne E'cole College
Dezyne E'cole College
dezyneecole
 
Dezyne E'cole College
Dezyne E'cole CollegeDezyne E'cole College
Dezyne E'cole College
dezyneecole
 
Vartika khandelwal
Vartika khandelwalVartika khandelwal
Vartika khandelwal
dezyneecole
 
Ankita gupta assignments ppt
Ankita gupta assignments pptAnkita gupta assignments ppt
Ankita gupta assignments ppt
dezyneecole
 
ankita gupta work
ankita gupta workankita gupta work
ankita gupta work
dezyneecole
 
Vartika khandelwal
Vartika khandelwalVartika khandelwal
Vartika khandelwal
dezyneecole
 
Ankita gupta work
Ankita gupta workAnkita gupta work
Ankita gupta work
dezyneecole
 
Counter design 1
Counter design 1Counter design 1
Counter design 1
dezyneecole
 
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
dezyneecole
 
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
dezyneecole
 
Interior design
Interior designInterior design
Interior design
dezyneecole
 
Design devlopment
Design devlopmentDesign devlopment
Design devlopment
dezyneecole
 
Gazal & chanchal
Gazal & chanchalGazal & chanchal
Gazal & chanchal
dezyneecole
 
BBA-II Year Students Work
BBA-II Year Students WorkBBA-II Year Students Work
BBA-II Year Students Work
dezyneecole
 
Yogita Motiramani MSc.FT
Yogita Motiramani MSc.FTYogita Motiramani MSc.FT
Yogita Motiramani MSc.FT
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.-FT
dezyneecole
 
Bba students working
Bba students workingBba students working
Bba students working
dezyneecole
 

More from dezyneecole (20)

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
 
Gazal & chanchal
Gazal & chanchalGazal & chanchal
Gazal & chanchal
 
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
 
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
 
Bba students working
Bba students workingBba students working
Bba students working
 

C programming (Part 1)

  • 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));