Home
10th Grade
11th And 12th
11th Grade
12th Grade
3rd Grade
4th Grade
5th Grade
6th Grade
7th Grade
8th Grade
9th Grade
Advance Accountancy
Auditing
Computer Aptitude
Direct And Indirect Taxation
Exams
General Hindi
Indian Finance System
Information Technology And Application In Business
Macro Economics
Town Planning
Aerospace And Aeronautical
Analytical Instrumentation
Banking Awareness
Banking Exam
Biochemistry
Bioinformatics
Biology
Biotechnology
Business Statistics
C Program
C Programming
C++ Programming
Career Aptitude Test
Cell Biology
Central Superior Service (css)
Chemical Engineering
Chemistry
Civil Engineering
Commerce
Computer
Computer Fundamentals
Computer Science
Cost Accounting
Css
Database
Drug And Pharmaceutical Biotechnology
Ecat And Mcat Entry Test
Economics
Electrical Engineering
Electrical Engineering Questions
Electrical Measurement And Instrumentation
Engineering
English
English Literature
Environment Management
Environmental Biotechnology
Enzyme Technology
Financial Management And Financial Markets
Gate
General Knowledge
Graduate Assessment Test (gat)
Health And Physical
Heat Transfer
Html
Human Anatomy And Physiology
Human And Cultural Diversity
Human Resource Management
Ias
Indian Economy
Indian Economy
Indian General Awareness
Indian Geography
Indian Geography
Indian History
Indian History
Indian Polity
Instrumentation Transducers
International Relations
Java Program
Javascript
Judiciary And Law
Life Sciences
Management
Marketing And Marketing Management
Mass Transfer
Mechanical Engineering
Mechanics Of Materials
Medical Subjects
Microbiology
Networking
Php
Placement Tests
Professional Communication
Quantitative Aptitude
Reasoning Aptitude
Renewable Energy
Science
Sociology
Sql
Surveying
Total Quality Management
Uidai Aadhaar Supervisor Certification
Virology
Notificatin
Exam
Blog
Contact Us
C Miscellaneous(Computer Science > C Program ) Questions and Answers
Home
Topic
Computer Science
C Program
C Miscellaneous
Question 1.
Determine output:
void main()
{
int const *p=5;
printf("%d", ++(*p));
}
6
5
Garbage Value
Compiler Error
Explanation:-
Answer: Option D. ->
Compiler Error
Question 2.
Determine Output:
void main()
{
char s[]="man";
int i;
for(i=0; s[i]; i++)
printf("%c%c%c%c ", s[i], *(s+i), *(i+s), i[s]);
}
mmm nnn aaa
mmmm nnnn aaaa
Compiler Error
None of These
Explanation:-
Answer: Option D. ->
None of These
Question 3.
Determine Output:
void main()
{
float me = 1.1;
double you = 1.1;
if(me==you)
printf("I hate Examveda");
else
printf("I love Examveda");
}
I hate Examveda
I love Examveda
Error
None of These
Explanation:-
Answer: Option B. ->
I love Examveda
Question 4.
Determine Output:
void main()
{
static int var = 5;
printf("%d ", var--);
if(var)
main();
}
5 5 5 5 5
5 4 3 2 1
Infinite Loop
None of These
Explanation:-
Answer: Option B. ->
5 4 3 2 1
Question 5.
Determine Output:
void main()
{
char *p;
printf("%d %d", sizeof(*p), sizeof(p));
}
1 1
1 2
2 1
2 2
Explanation:-
Answer: Option B. ->
1 2
Question 6.
Determine the Final Output:
void main()
{
printf("\nab");
printf("\bsi");
printf("\rha");
}
absiha
asiha
haasi
hai
Explanation:-
Answer: Option D. ->
hai
Question 7.
Determine Output:
void main()
{
int c = - -2;
printf("c=%d", c);
}
1
-2
2
Error
Explanation:-
Answer: Option C. ->
2
Question 8.
Determine Output:
void main()
{
int i=10;
i=!i>14;
printf("i=%d", i);
}
10
14
0
1
Explanation:-
Answer: Option C. ->
0
Question 9.
Determine Output:
void main()
{
int i=3;
switch(i)
{
default: printf("zero");
case 1: printf("one"); break;
case 2: printf("two"); break;
case 3: printf("three"); break;
}
}
zero
three
Error
None of These
Explanation:-
Answer: Option B. ->
three
Question 10.
Determine Output:
#define int char
void main()
{
int i = 65;
printf("sizeof(i)=%d", sizeof(i));
}
sizeof(i)=2
sizeof(i)=1
Compiler Error
None of These
Explanation:-
Answer: Option B. ->
sizeof(i)=1
1
2
3
4
5
Next →
One click Login
Login With Google
Old way of Login
Login With Email