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

PPTX
Lect08 exercises
PDF
C questions
RTF
PDF
Revision1 C programming
PDF
CS50 Lecture4
PDF
Revision1schema C programming
DOCX
Euler method in c
PDF
Chapter 5 exercises Balagurusamy Programming ANSI in c
Lect08 exercises
C questions
Revision1 C programming
CS50 Lecture4
Revision1schema C programming
Euler method in c
Chapter 5 exercises Balagurusamy Programming ANSI in c

What's hot (19)

PPT
Intro to c programming
PDF
Creative Coding 1 - 2 Variables
PDF
Chapter 4 : Balagurusamy Programming ANSI in C
PDF
Chapter 3 : Balagurusamy Programming ANSI in C
DOCX
Programming fundamentals
PDF
Benginning Calculus Lecture notes 9 - derivative functions
DOCX
(Www.entrance exam.net)-tcs placement sample paper 2
DOCX
Matlab code for secant method
PDF
Chapter 6 Balagurusamy Programming ANSI in c
PDF
Benginning Calculus Lecture notes 6 - implicit differentiation
DOC
Lab 9 sem ii_12_13
PDF
DOCX
Lab 10 sem ii_12_13
PDF
Chapter 2 : Balagurusamy_ Programming ANsI in C
PDF
ICP - Lecture 5
DOC
Lab 6
PDF
The solution manual of c by robin
DOCX
Core programming in c
PDF
Benginning Calculus Lecture notes 3 - derivatives
Intro to c programming
Creative Coding 1 - 2 Variables
Chapter 4 : Balagurusamy Programming ANSI in C
Chapter 3 : Balagurusamy Programming ANSI in C
Programming fundamentals
Benginning Calculus Lecture notes 9 - derivative functions
(Www.entrance exam.net)-tcs placement sample paper 2
Matlab code for secant method
Chapter 6 Balagurusamy Programming ANSI in c
Benginning Calculus Lecture notes 6 - implicit differentiation
Lab 9 sem ii_12_13
Lab 10 sem ii_12_13
Chapter 2 : Balagurusamy_ Programming ANsI in C
ICP - Lecture 5
Lab 6
The solution manual of c by robin
Core programming in c
Benginning Calculus Lecture notes 3 - derivatives
Ad

Viewers also liked (12)

PDF
Jagdish prasad sharma(IT Ist Year Work)
PDF
Alexander Rybak PPP Slideshow
PDF
23377494 makalah
PPTX
Macmohan’s 1981
PDF
MICRO ECONOMICS
PDF
Presentation Sauer Automation
PPTX
Freemium mobile games
PPTX
opportunities and risk of e-banking
PPT
The Comprehension Toolkit
PDF
Al quran16lines
PPS
Feliz navidad Iriarte
PDF
اجابات درس افاق مستقبلية و اسئلة الوحدة للصف العاشر
Jagdish prasad sharma(IT Ist Year Work)
Alexander Rybak PPP Slideshow
23377494 makalah
Macmohan’s 1981
MICRO ECONOMICS
Presentation Sauer Automation
Freemium mobile games
opportunities and risk of e-banking
The Comprehension Toolkit
Al quran16lines
Feliz navidad Iriarte
اجابات درس افاق مستقبلية و اسئلة الوحدة للصف العاشر
Ad

Similar to C programming (Part 1) (20)

DOCX
C interview question answer 2
PDF
LET US C (5th EDITION) CHAPTER 2 ANSWERS
DOC
C aptitude.2doc
DOC
Captitude 2doc-100627004318-phpapp01
DOCX
Let us C (by yashvant Kanetkar) chapter 3 Solution
PDF
important C questions and_answers praveensomesh
PPTX
C Programs.pptx
DOC
C tech questions
PDF
Basic C Programming Lab Practice
PDF
Bcsl 033 data and file structures lab s1-1
PDF
C multiple choice questions and answers pdf
DOCX
Qust & ans inc
PDF
C Programming Example
PDF
PPTX
introduction to c programming and C History.pptx
DOCX
Chapter 8 c solution
PDF
2D array
PDF
Srinivas Reddy Amedapu, CPDS, CP Lab, JNTU Hyderabad
PDF
Srinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
PPTX
Cse 121 presentation on matrix [autosaved]
C interview question answer 2
LET US C (5th EDITION) CHAPTER 2 ANSWERS
C aptitude.2doc
Captitude 2doc-100627004318-phpapp01
Let us C (by yashvant Kanetkar) chapter 3 Solution
important C questions and_answers praveensomesh
C Programs.pptx
C tech questions
Basic C Programming Lab Practice
Bcsl 033 data and file structures lab s1-1
C multiple choice questions and answers pdf
Qust & ans inc
C Programming Example
introduction to c programming and C History.pptx
Chapter 8 c solution
2D array
Srinivas Reddy Amedapu, CPDS, CP Lab, JNTU Hyderabad
Srinivas Reddy Amedapu C and Data Structures JNTUH Hyderabad
Cse 121 presentation on matrix [autosaved]

More from dezyneecole (20)

PDF
Dezyne E'cole College
PDF
Dezyne E'cole College
PDF
Dezyne E'cole College
PDF
Dezyne E'cole College
PDF
Vartika khandelwal
PDF
Ankita gupta assignments ppt
PDF
ankita gupta work
PDF
Vartika khandelwal
PDF
Ankita gupta work
PDF
Counter design 1
PDF
Vicky tulsiani counter design final assignments copy
PDF
interior design MSc. I sem. student work
PDF
Interior design
PDF
Design devlopment
PDF
Gazal & chanchal
PDF
BBA-II Year Students Work
PDF
Yogita Motiramani MSc.FT
PPTX
Heena shrivastav MSc.-FT
PDF
Aditi karwa MSc.-FT
PDF
Bba students working
Dezyne E'cole College
Dezyne E'cole College
Dezyne E'cole College
Dezyne E'cole College
Vartika khandelwal
Ankita gupta assignments ppt
ankita gupta work
Vartika khandelwal
Ankita gupta work
Counter design 1
Vicky tulsiani counter design final assignments copy
interior design MSc. I sem. student work
Interior design
Design devlopment
Gazal & chanchal
BBA-II Year Students Work
Yogita Motiramani MSc.FT
Heena shrivastav MSc.-FT
Aditi karwa MSc.-FT
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));