what is the purpose of the code, and is there any problem
with it.
unsigned int v[10];
unsigned int i = 0;
while (i < 10)
v[i] = i++;
Answer Posted / arka bandyopadhyay
Basically it's a tricky question and the values of v[i] cannot be predicted as there is "i++" which means 'use than change'
that is error associated with the program so using ++i will give us the correct result.
Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
Which header file should you include if you are to develop a function which can accept variable number of arguments?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
What are the types of operators in c?
What is a void * in c?
can we change the default calling convention in c if yes than how.........?
Write a program to maintain student’s record. Record should
not be available to any unauthorized user. There are three
(3) categories of users. Each user has its own type. It
depends upon user’s type that which kind of operations user
can perform. Their types and options are mentioned below:
1. Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record)
2. Super Admin
(Search Record [by Reg. No or Name], View All Records,
Insert New Record, Modify Existing Record, Delete Single Record)
3. Guest
(Search Record [by Reg. No or Name], View All Records)
When first time program runs, it asks to create accounts.
Each user type has only 1 account (which means that there
can be maximum 3 accounts). In account creation, following
options are required:
Login Name: <6-10 alphabets long, should be unique>
Password: <6-10 alphabets long, should not display
characters when user type>
Confirm Password:
Process by which one bit pattern in to another by bit wise operation is?
Explain what is the benefit of using enum to declare a constant?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
What is difference between array and pointer in c?
What is the difference between text files and binary files?
What is function definition in c?
Is c is a procedural language?
How do I get an accurate error status return from system on ms-dos?
Why is c fast?