What is the difference between char a[] = "string"; and
char *p = "string"; ?
Answer Posted / srinivas
a is a const pointer, whereas p is not
meaning 'a' will point to a fixed location (value of 'a' or
address of *a can't change, remains fixed) - though
contents of a can be changed (by way of accessing a[i])
| Is This Answer Correct ? | 36 Yes | 6 No |
Post New Answer View All Answers
How can I remove the trailing spaces from a string?
difference between Low, Middle, High Level languages in c ?
Describe the steps to insert data into a singly linked list.
Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.
What is meant by inheritance?
Can the size of an array be declared at runtime?
What are qualifiers?
write a program that will open the file, count the number of occurences of each word in the the complete works of shakespeare. You will then tabulate this information in another file.
What is c language and why we use it?
Explain what is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
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:
Explain output of printf("Hello World"-'A'+'B'); ?
Which type of language is c?
If you know then define #pragma?
What are the different types of control structures in programming?