void main()
{
int const * p=5;
printf("%d",++(*p));
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
Compiler error: Cannot modify a constant value.
Explanation:
p is a pointer to a "constant integer". But we
tried to change the value of the "constant integer".
Is This Answer Correct ? | 79 Yes | 10 No |
Answer / mahe
5
pointer value does not change.so print thier value
Is This Answer Correct ? | 3 Yes | 8 No |
Answer / jambalakadi pamba
here...p is a pointer which is pointing to a addresss which is constant....!!! so the output is 6
Is This Answer Correct ? | 8 Yes | 22 No |
main() { char *a = "Hello "; char *b = "World"; clrscr(); printf("%s", strcpy(a,b)); } a. “Hello” b. “Hello World” c. “HelloWorld” d. None of the above
4 Answers Corporate Society, HCL,
A program that will create a movie seat reservation. The program will display the summary seats and its status. The user will be ask what seat no. to be reserved, then it will go back again to the summary to display the updated seat status. If the seat no. is already reserved then it will prompt an error message. And also if the input seat no is out of range then it will also prompt an error message. The program is continuously running. Termination of the program will depends on how the programmer will apply. Sample output: Movie Seats Reservation Summary of Seats: Seat 1: Available Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 1 Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 6 The Seat no. is out of range! Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 1 The Seat no. is already reserved! Movie Seats Reservation Summary of Seats: Seat 1: Reserve Seat 2: Available Seat 3: Available Seat 4: Available Seat 5: Available Enter seat no. (Press 0 to terminate Or the assigned seat capacity) : 0 GoodBye... Thank You!!!
how to concatenate the two strings
#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }
void main() { static int i=i++, j=j++, k=k++; printf(“i = %d j = %d k = %d”, i, j, k); }
C statement to copy a string without using loop and library function..
main() { unsigned char i=0; for(;i>=0;i++) ; printf("%d\n",i); }
main() { register int a=2; printf("Address of a = %d",&a); printf("Value of a = %d",a); }
#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }
main() { int c = 5; printf("%d", main||c); } a. 1 b. 5 c. 0 d. none of the above
Write a program that reads a dynamic array of 40 integers and displays only even integers
How to return multiple values from a function?