The Gateway to Computer Science Excellence
For all GATE CSE Questions
Toggle navigation
Facebook Login
or
Email or Username
Password
Remember
Login
Register
|
I forgot my password
Activity
Questions
Unanswered
Tags
Subjects
Users
Ask
Prev
Blogs
New Blog
Exams
c type casting
+1
vote
57
views
what is the meaning of k= (char *) (i*j)
it will return k =(char *) (300)
programming-in-c
asked
Jan 27, 2018
in
Programming
by
Jaspreet Kaur Bains
Junior
(
567
points)
|
57
views
answer
comment
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answer will be 300.
It will print 44 if k is declared as type char.
answered
Oct 6
by
tech_beardo
(
205
points)
edited
Oct 6
by
tech_beardo
comment
Please
log in
or
register
to add a comment.
← Prev. Qn. in Sub.
Next Qn. in Sub. →
← Prev.
Next →
Related questions
0
votes
0
answers
1
C programming - Type casting
Please explain the output for the following program: #include<stdio.h> int main() { int i = 100; int *a = &i; float *f = (float *)a; (*f)++; printf("%d", *a); //getting some garbage value }
asked
Sep 2, 2018
in
Programming
by
garvit_vijai
(
257
points)
|
157
views
programming-in-c
pointers
output
programming
+3
votes
2
answers
2
Array-name and pointer manipulation + type casting
#include <stdio.h> int main() { int A[3][4] = {{1,2,3,4}, {4,5,6,7}, {8,9,10,11} }; int *p = &A[0][0]; int *q = (int*)(&A[0]+1); int *z = (int*)(&A+1); int *w = (int*)A; printf("%d\n",*(p + 1)); printf("%d\n",*(q - 2)); printf("%d\n",*(z - 2)); printf("%u %d\n",w,*(w+1)); }
asked
Dec 14, 2016
in
Programming
by
dd
Veteran
(
57k
points)
|
440
views
programming-in-c
programming
0
votes
1
answer
3
Type casting
asked
May 14, 2016
in
Programming
by
Sourabh Kumar
Active
(
1.5k
points)
|
341
views
programming-in-c
0
votes
1
answer
4
Type casting
K is int type K=2.0/9; What k will print? In let us c they give that k final value is 0.0 But I think it's value is 0
asked
May 13, 2016
in
Programming
by
Sourabh Kumar
Active
(
1.5k
points)
|
149
views
programming-in-c
Quick search syntax
tags
tag:apple
author
user:martin
title
title:apple
content
content:apple
exclude
-tag:apple
force match
+apple
views
views:100
score
score:10
answers
answers:2
is accepted
isaccepted:true
is closed
isclosed:true
Recent Posts
Linear Algebra Important Points
GATE 2020
OFFICIAL GATE MOCK TEST RELEASED
IIITH: Winter Research Admissions 2019 (For Spring 2020)
TIFR and JEST exam
All categories
General Aptitude
1.9k
Engineering Mathematics
7.5k
Digital Logic
2.9k
Programming and DS
4.9k
Programming
3.5k
DS
1.3k
Algorithms
4.3k
Theory of Computation
6.2k
Compiler Design
2.1k
Operating System
4.5k
Databases
4.1k
CO and Architecture
3.4k
Computer Networks
4.1k
Non GATE
1.5k
Others
1.5k
Admissions
595
Exam Queries
576
Tier 1 Placement Questions
23
Job Queries
72
Projects
17
Follow @csegate
Recent Blog Comments
Lakshman Patel RJIT Do you have such notes...
Great work sir
Yes Sir, It will be very helpful if we get...
@arjun sir is there a pdf...
Really helpful sir Thanks a ton👍👍
50,645
questions
56,556
answers
195,715
comments
101,582
users