How can I Create a C program in splitting set of characters
to specific subsets.
Example:
INPUT SET OF CHARACTERS:
Therefore, my dear brothers and sisters, stand firm. Let
nothing move you. Always give yourselves fully to the work
of the Lord, because you know that your labor in the Lord is
not in vain.
SPLIT INTO HOW MANY CHARACTERS PER SUBSETS: 10
OUTPUT:
Therefore,
my dear b
rothers an
d sisters,
stand fir
m. Let not
hing move
you. Alway
s give you
rselves fu
lly to the
work of t
he Lord, b
ecause you
know that
your labo
r in the L
ord is not
in vain.
Given a spherical surface, write bump-mapping procedure to generate the bumpy surface of an orange
1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18.
main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }
PROG. TO PRODUCE 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
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!!!
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }
Write a program to model an exploding firecracker in the xy plane using a particle system
What is the output for the following program main() { int arr2D[3][3]; printf("%d\n", ((arr2D==* arr2D)&&(* arr2D == arr2D[0])) ); }
#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }
void main() { int *mptr, *cptr; mptr = (int*)malloc(sizeof(int)); printf(“%d”,*mptr); int *cptr = (int*)calloc(sizeof(int),1); printf(“%d”,*cptr); }
Is this code legal? int *ptr; ptr = (int *) 0x400;