Archive Pages Design$type=blogging

objective type questions in c programming language set-6

1. Which symbol is used as a statement terminator in C? A) ! B) ~ C) # D) ; 2. If the size of the array is less than the number of initiali...



1. Which symbol is used as a statement terminator in C?

A) !

B) ~

C) #

D) ;


2. If the size of the array is less than the number of initializes then, ..........

A) extra values are being ignored

B) generates an error message

C) size of array is increased

D) size is neglected when values are given


3. In C, if you pass an array as an argument to a function, what actually gets passed?

A) Value of elements in array

B) First element of the array

C) Base address of the array

D) Address of the last element of array


4. How many times the following loop be executed? { .. ch='b'; while (ch>='a' && ch<=='z') ch++; }

A) 0

B) 25

C) 26

D) 1


5. If a=8 and b=15 then the statement x=(a>b) ? a:b;


A) assigns a value 8 to x

B) gives an error message

C) assigns a value 15 to x

D) assigns a value 7 to x


6. What is the output of the following code. int n=0, m=1; do { printf("%d", m); m++; } while (m<=n);

A) 0

B) 2

C) 1

D) 4


7. A C program contains the following declaration int i=8, j=5 what would be the value of following expression? abs(i-2*j)
A) 2

B) 4

C) 6

D) 8


8. The output of the following is . int a=75; printf("%d%%", a);

A) 75

B) 75%%

C) 75%

D) None of the above


9. How many times the following program would print ("abc")? main( ) { printf("\nabc"); main( ); }

A) Infinite number of times

B) 32767 times

C) 65535 times

D) Till the stack does not overflow


10. Which of the following is the correct usage of conditional operators used in C?

A) a>b?c=30:c=40;

B) a>b?c=30;

C) max=a>b?a>c?a:c:b>c?b:c

D) return (a>b)?(a:b)





Answers:



1. Which symbol is used as a statement terminator in C?

D) ;

2. If the size of the array is less than the number of initializes then, ..........

B) generates an error message

3. In C, if you pass an array as an argument to a function, what actually gets passed?

C) Base address of the array

4. How many times the following loop be executed? { .. ch='b'; while (ch>='a' && ch<=='z') ch++; }

B) 25

5. If a=8 and b=15 then the statement x=(a>b) ? a:b;

C) assigns a value 15 to x

6. What is the output of the following code. int n=0, m=1; do { printf("%d", m); m++; } while (m<=n);

C) 1

7. A C program contains the following declaration int i=8, j=5 what would be the value of following expression? abs(i-2*j)
A) 2

8. The output of the following is . int a=75; printf("%d%%", a);

D) None of the above

9. How many times the following program would print ("abc")? main( ) { printf("\nabc"); main( ); }

A) Infinite number of times

10. Which of the following is the correct usage of conditional operators used in C?

C) max=a>b?a>c?a:c:b>c?b:c




Related Posts

 

تعليقات

الاسم

Artificial Intelligence(AI) Backlinking Basic IT Best List Blogging Tips C C# C++ Computer Architecture Computer Fundamental Computer Security Computer/IT Officer Exam CSS Data Mining and Warehousing Data Recovery Tools Data Structure Database Management System E-commerce E-government Internet & Web Designing IT Law IT Tips and Tricks IT Tutorials Java JavaScript Keyword Research Tools MIS Multiple Choice Question (MCQ) Networking Online Earning Online IT Jobs Operating System Oracle Forms and Reports Programming Guide Programming Language SEO Social Networking Sites Software Download Software Engineering System Analysis and Design Top List VB.Net
false
rtl
item
Max5: objective type questions in c programming language set-6
objective type questions in c programming language set-6
Max5
https://maxs27.blogspot.com/2014/08/objective-type-questions-in-c.html
https://maxs27.blogspot.com/
http://maxs27.blogspot.com/
http://maxs27.blogspot.com/2014/08/objective-type-questions-in-c.html
true
1760660989564394152
UTF-8
لم يتم العثور على اى مواضيع شاهد الكل اقرأ المزيد رد احذف الرد حذف بواسطة الرئيسية صفحات مواضيع شاهد الكل نوصى لك التسميات الارشيف بحث لم يتم العثور على ماتبحث عنه عودة للرئيسية الاحد الاثنين الثلاثاء الاربعاء الخميس الجمعة السبت الاحد الاثنين الثلاثاء الاربعاء الخميس الجمعة السبت يناير فبراير مارس ابريل مايو يونيو يوليو اغسطس سبتمبر اكتوبر نوفمبر ديسمبر يناير فبراير مارس ابريل مايو يونيو يوليو اغسطس سبتمبر اكتوبر نوفمبر ديسمبر just now 1 دقيقة مضت $$1$$ دقيقة مضت 1 hour ago $$1$$ ساعة مضت الامس $$1$$ يوم مضى $$1$$ اسبوع مضى اكثر من 5 اسابيع مضت